/* WellPlus EMR — WellPlus Medical Group brand (navy #182460 + cyan #3078C0),
   Apple "Liquid Glass" aesthetic: translucent frosted layers over a brand mesh. */
:root {
  --navy: #1E2E60;      /* sampled from wellplus-logo.png — the one brand navy everywhere */
  --navy-2: #2a4f9e;
  --cyan: #3480C3;      /* logo cyan */
  --cyan-deep: #2a6cb0;
  --cyan-text: #2766a8;
  --brand-grad: linear-gradient(135deg, #182460 0%, #2a4f9e 52%, #3078C0 100%);
  --navy-grad: linear-gradient(140deg, #314a86 0%, #182460 100%);
  --accent: #182460;
  --ink: #19223b;
  --ink-2: #5b6078;
  --ink-3: #6b7288;   /* darkened from #939bb0 → passes WCAG AA (~4.4:1) for small clinical text */
  --gold: #b8860b;
  --danger: #e5484d;
  --warn: #d97706;
  --purple: #7c4dff;
  --ok: #16a34a;

  --line: rgba(24, 36, 96, .10);
  --line-2: rgba(24, 36, 96, .06);
  --glass: rgba(255, 255, 255, .70);
  --glass-strong: rgba(255, 255, 255, .84);
  --glass-soft: rgba(255, 255, 255, .50);
  --glass-border: rgba(255, 255, 255, .65);
  --blur: blur(13px) saturate(170%);   /* lowered from 22px — big paint-cost cut, still glassy */
  --r-card: 18px;
  --r-ctl: 12px;
  --shadow: 0 1px 2px rgba(24, 36, 96, .06), 0 10px 28px rgba(24, 36, 96, .07);
  --shadow-md: 0 6px 20px rgba(24, 36, 96, .10);
  --shadow-lg: 0 20px 54px rgba(24, 36, 96, .18);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'SF Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Spacing scale (4px grid) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-8: 48px;
  /* Radius scale */
  --r-sm: 8px; --r-md: 11px; --r-lg: 14px; --r-xl: 20px; --r-pill: 999px;
  /* Type scale */
  --text-micro: 10px; --text-xs: 11px; --text-sm: 12px; --text-base: 13px;
  --text-md: 14px; --text-lg: 16px; --text-xl: 20px; --text-2xl: 26px; --text-3xl: 32px;
  /* Motion tokens */
  --dur-fast: 120ms; --dur: 180ms; --ease: cubic-bezier(.16, 1, .3, 1);
  /* Semantic state triads */
  --ok-text: #15803d; --ok-bg: rgba(22, 163, 74, .12); --ok-border: rgba(22, 163, 74, .28);
  --warn-text: #b45309; --warn-bg: rgba(217, 119, 6, .12); --warn-border: rgba(217, 119, 6, .30);
  --danger-text: #b91c1c; --danger-bg: rgba(229, 72, 77, .12); --danger-border: rgba(229, 72, 77, .30);
  --info-text: var(--cyan-text); --info-bg: rgba(48, 120, 192, .12); --info-border: rgba(48, 120, 192, .28);
  --focus-ring: 0 0 0 3px rgba(48, 120, 192, .35);
}

/* Keyboard focus — this is a keyboard-driven clinical tool and had NO visible focus. */
:where(a, button, [tabindex], input, select, textarea, [role="tab"], [role="button"]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
:where(a, button, [tabindex]):focus:not(:focus-visible) { outline: none; }

/* Respect reduced-motion (mandated by house rules; was missing everywhere). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  font-family: var(--font); color: var(--ink); font-size: 13.5px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; letter-spacing: -0.011em;
  background: #eaeef4;
}
/* The ambient mesh lives on a FIXED, GPU-composited layer instead of
   background-attachment:fixed on <body> — the latter re-rasterizes the gradient on
   every scroll frame (the jitter). As its own compositor layer it stays put with zero
   scroll-time repaint, so the columns scroll glassy-smooth. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 620px at 8% -8%, rgba(48, 120, 192, .20), transparent 56%),
    radial-gradient(1000px 720px at 108% 4%, rgba(24, 36, 96, .16), transparent 52%),
    radial-gradient(900px 640px at 50% 120%, rgba(48, 120, 192, .12), transparent 60%);
  transform: translateZ(0);
}
/* Buttery scrolling everywhere: every scroll region contains its own momentum so the
   wheel/trackpad never chains or rubber-bands into a neighbor or the page. */
#view-chart .col, .q-rail, .q-detail, .pl-master, .pl-detail, .hist-form, .alg-form,
.assess-pick, .dxs-results, .dx-body, .dx-guard, .dx-companion, .set-table-wrap,
.med-hist, .pop, .ta-drop, .modal-card { overscroll-behavior: contain; }
button, input, select, textarea { font-family: inherit; }   /* the physician's font choice reaches every control, textareas included */
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: rgba(24, 36, 96, .22); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(24, 36, 96, .34); background-clip: content-box; }

/* glass mixin helper via class */
.glass { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-border); }

/* ===== Top bar (liquid glass) ===== */
.topbar {
  height: 58px; display: flex; align-items: center; gap: 22px; padding: 0 22px;
  position: sticky; top: 0; z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(24, 36, 96, .05), 0 6px 20px rgba(24, 36, 96, .04);
}
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand .logo { height: 27px; width: auto; display: block; }
.brand .mark { width: 27px; height: 27px; border-radius: 9px; background: var(--brand-grad); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 3px 10px rgba(24, 36, 96, .3); }
.brand .pill { font-size: 10px; font-weight: 650; color: var(--cyan-text); background: rgba(48, 120, 192, .16); padding: 3px 8px; border-radius: 8px; letter-spacing: .4px; }
.topnav { display: flex; align-items: center; gap: 3px; }
.topnav a { font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 8px 13px; border-radius: 10px; transition: all .14s; position: relative; cursor: pointer; }
/* Clickable elements that aren't <button> or <a href> still need the hand cursor */
.q-item, [role="button"], a[data-view] { cursor: pointer; }
.topnav a:hover { color: var(--navy); background: rgba(255, 255, 255, .6); }
.topnav a.active { color: var(--navy); background: rgba(255, 255, 255, .82); box-shadow: var(--shadow); }
.topnav a.active::after { content: ''; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--brand-grad); }
.topbar .spacer { flex: 1; }
.iconbtn { width: 36px; height: 36px; border-radius: 11px; border: none; background: transparent; color: var(--ink-2); display: flex; align-items: center; justify-content: center; position: relative; transition: all .14s; }
.iconbtn:hover { background: rgba(255, 255, 255, .7); color: var(--navy); }
.iconbtn .badge { position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 650; display: flex; align-items: center; justify-content: center; }
.who { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.btn-ghost { font-size: 12.5px; font-weight: 600; color: var(--navy); border: 1px solid var(--glass-border); background: rgba(255, 255, 255, .6); backdrop-filter: var(--blur); padding: 8px 13px; border-radius: 11px; display: flex; align-items: center; gap: 6px; transition: all .14s; }
.btn-ghost:hover { background: rgba(255, 255, 255, .92); box-shadow: var(--shadow); transform: translateY(-1px); }

main.main { min-height: calc(100vh - 58px); }
.view { animation: fade var(--dur) var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ===== Glass cards ===== */
.card {
  /* Opaque content surface — legibility of dense clinical data must not depend on the
     mesh behind it, and dropping backdrop-filter here removes most of the paint cost.
     The top specular line (::before) keeps the glass character. Glass is reserved for
     chrome/overlays (topbar, modals, popovers, dropdowns). */
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: 0 1px 2px rgba(24, 36, 96, .05), 0 8px 24px rgba(24, 36, 96, .06);
  overflow: hidden; position: relative;
}
.card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), transparent); pointer-events: none; }
.card > header { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .15)); cursor: pointer; user-select: none; }
/* Collapsible cards */
.card-chev { width: 15px; height: 15px; color: var(--ink-3); flex-shrink: 0; transition: transform var(--dur-fast) var(--ease); }
.card.collapsed .card-chev { transform: rotate(-90deg); }
.card.collapsed > .body { display: none; }
.card.collapsed { box-shadow: 0 1px 2px rgba(24, 36, 96, .05); }
.card.collapsed > header { border-bottom: none; }
.card > header:hover .card-chev { color: var(--navy); }
.card > header h2 { font-size: 13px; font-weight: 700; letter-spacing: -.01em; color: var(--navy); }
.card > header .count { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.card > header .act { font-size: 12px; font-weight: 600; color: var(--cyan-text); background: none; border: none; }
.card .body { padding: 6px 0; }
.card .body.pad { padding: 14px 16px; }
.empty { padding: 22px 16px; color: var(--ink-3); font-size: 12.5px; text-align: center; }
.row-item { padding: 11px 16px; border-bottom: 1px solid var(--line-2); display: flex; gap: 10px; align-items: flex-start; transition: background .1s; }
.row-item:last-child { border-bottom: none; }
.row-item:hover { background: rgba(255, 255, 255, .55); }
.row-item .main { flex: 1; min-width: 0; }
.row-item .t { font-weight: 600; font-size: 13px; color: var(--ink); }
.row-item .s { font-size: 11.5px; color: var(--ink-2); margin-top: 1px; }
.chip { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.chip.code { color: var(--navy); background: rgba(24, 36, 96, .08); }
.chip.hcc { color: var(--cyan-text); background: rgba(48, 120, 192, .16); }
.chip.raf { color: #8a6300; background: rgba(184, 134, 11, .14); }
.chip.plan { color: var(--navy); background: rgba(24, 36, 96, .08); }
.chip.mso { color: var(--cyan-text); background: rgba(48, 120, 192, .16); }

/* ===== Home ===== */
.home { padding: 26px; max-width: 1520px; margin: 0 auto; }
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.home-head h1 { font-size: 27px; font-weight: 700; letter-spacing: -.03em; color: var(--navy); }
.home-head .sub { font-size: 13.5px; color: var(--ink-3); margin-top: 3px; }
.quick { display: flex; gap: 11px; }
.qtile { background: var(--glass); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: 14px; padding: 11px 15px; display: flex; align-items: center; gap: 11px; box-shadow: var(--shadow); transition: all .16s; position: relative; }
.qtile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.qtile .qi { width: 34px; height: 34px; border-radius: 10px; background: rgba(24, 36, 96, .07); color: var(--navy); display: flex; align-items: center; justify-content: center; }
.qtile .ql { font-size: 12.5px; font-weight: 600; }
.qtile .qb { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 650; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(229, 72, 77, .4); }

.findbar { display: flex; align-items: center; gap: 11px; background: var(--glass-strong); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: 16px; padding: 4px 6px 4px 18px; box-shadow: var(--shadow); margin-bottom: 18px; }
.findbar svg { color: var(--navy); }
.findbar input { flex: 1; border: none; outline: none; font-size: 15.5px; padding: 13px 0; background: transparent; color: var(--ink); }

.home-grid { display: grid; grid-template-columns: minmax(380px, 440px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .home-grid { grid-template-columns: 1fr; } }

/* schedule */
.sched header { gap: 7px; }
.sched .dlabel { font-size: 13px; font-weight: 700; color: var(--navy); }
.datenav { width: 27px; height: 27px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .6); color: var(--ink-2); font-size: 15px; line-height: 1; transition: all .12s; }
.datenav:hover { background: #fff; color: var(--navy); }
.today-btn { font-size: 11.5px; font-weight: 700; color: var(--cyan-text); border: 1px solid rgba(48, 120, 192, .35); background: rgba(48, 120, 192, .14); border-radius: 9px; padding: 4px 10px; }
.appt { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; align-items: center; transition: background .1s; }
.appt:last-child { border-bottom: none; }
.appt:hover { background: rgba(255, 255, 255, .55); }
.appt .time { width: 58px; flex-shrink: 0; }
.appt .time b { font-size: 13px; font-weight: 700; color: var(--navy); }
.appt .time small { display: block; font-size: 10.5px; color: var(--ink-3); }
.appt .who2 { flex: 1; min-width: 0; }
.appt .who2 .nm { font-weight: 600; font-size: 13px; }
.appt .who2 .rs { font-size: 11px; color: var(--ink-2); }
.stt { font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.stt.scheduled { background: rgba(24, 36, 96, .08); color: var(--ink-2); }
.stt.confirmed { background: rgba(22, 163, 74, .14); color: var(--ok); }
.stt.arrived { background: rgba(217, 119, 6, .14); color: var(--warn); }

/* worklist */
.wl-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.wl-tab { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--glass); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: 999px; padding: 8px 14px; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow); transition: all .14s; }
.wl-tab:hover { color: var(--navy); transform: translateY(-1px); }
.wl-tab.active { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(24, 36, 96, .28); }
.wl-tab .n { font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 999px; background: rgba(24, 36, 96, .08); color: var(--navy); }
.wl-tab.active .n { background: rgba(255, 255, 255, .26); color: #fff; }
.wl-tab.dim { opacity: .5; }
.wl-tab.dim:hover { opacity: .85; }
.pcard { background: var(--glass); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: 15px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; cursor: pointer; transition: all .16s; margin-bottom: 11px; position: relative; }
.pcard::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent); }
.pcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.avatar { border-radius: 13px; background: var(--navy-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; box-shadow: 0 2px 7px rgba(24, 36, 96, .16); }
.pcard .avatar { width: 46px; height: 46px; font-size: 16px; }
.pcard .pinfo { flex: 1; min-width: 0; }
.pcard .pn { font-weight: 700; font-size: 14.5px; letter-spacing: -.01em; }
.pcard .pm { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.pcard .pmeta { display: flex; gap: 14px; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; flex-wrap: wrap; }
.pcard .pright { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* ===== Patient chart ===== */
.subhead {
  padding: 7px 20px 7px; display: flex; flex-direction: column; align-items: stretch; gap: 7px; position: sticky; top: 100px; z-index: 40;
  background: #ffffff; border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px rgba(24, 36, 96, .07);
}
.subhead-main { display: flex; align-items: center; gap: 12px; }
.subhead-id { flex: 1 1 auto; min-width: 0; }
.subhead-id h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subhead-id .demo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subhead-main .badges, .subhead-main .sactions { flex-shrink: 0; }
.subhead > .doctools { padding-top: 6px; border-top: 1px solid var(--line-2); }
.subhead .avatar { width: 36px; height: 36px; font-size: 14px; border-radius: 10px; flex-shrink: 0; }
.subhead h1 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; color: var(--navy); }
.subhead .demo { font-size: 11.5px; color: var(--ink-2); margin-top: 0; }
.subhead .demo b { color: var(--ink); }
.badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge-pill { font-size: 11px; font-weight: 650; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.badge-risk { background: linear-gradient(135deg, #fbeec4, #f6e0a4); color: #6b5210; border: 1px solid #ecd690; }
.badge-allergy { background: var(--attn-bg, rgba(217,119,87,.14)); color: var(--attn-text, #A64B2A); border: 1px solid var(--attn-border, rgba(217,119,87,.45)); cursor: pointer; transition: background .12s, color .12s; }
.badge-allergy:hover { background: var(--attn, #D97757); color: #fff; }
.badge-allergy.severe { background: var(--attn, #D97757); color: #fff; border-color: transparent; }
.badge-allergy.severe:hover { background: var(--attn-deep, #B3541E); }
.subhead .sactions { margin-left: 4px; display: flex; gap: 6px; }
.subhead .sactions .btn-primary { padding: 5px 12px; font-size: 12px; border-radius: 999px; box-shadow: 0 3px 12px rgba(24,36,96,.25); }
.subhead .sactions .btn-ghost { padding: 5px 12px; font-size: 12px; border-radius: 999px; }
/* All status chips (RISK, allergies, insurance, +Tag) share one size so they line up */
/* All line-1 status pills share one box model so heights match exactly */
.subhead .badge-pill,
.subhead-main .pchip-add,
.subhead-main .pchip-ins,
.subhead-main .ptag {
  display: inline-flex; align-items: center; box-sizing: border-box;
  height: 22px; padding: 0 11px; font-size: 11px; font-weight: 600;
  line-height: 1; border-radius: 999px; white-space: nowrap;
}
.subhead-main .ptag { padding: 0 5px 0 10px; }
.btn-primary { background: var(--brand-grad); color: #fff; border: none; border-radius: 12px; padding: 10px 17px; font-weight: 700; font-size: 13px; box-shadow: 0 4px 16px rgba(24, 36, 96, .3); transition: all .14s; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(24, 36, 96, .42); transform: translateY(-1px); filter: saturate(1.1); }

.chart { display: grid; grid-template-columns: var(--rail-w, 314px) 1fr var(--rail-r, 376px); gap: 16px; padding: 18px 24px 52px; align-items: start; }
@media (max-width: 1320px) { .chart { grid-template-columns: var(--rail-w, 290px) 1fr; } .chart .rail-right { grid-column: 1 / -1; } .rail-grip-r { display: none; } }
@media (max-width: 920px) { .chart { grid-template-columns: 1fr; } }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* Resizable left rail — drag the grip to widen the Problem workspace */
.rail-left, .rail-right { position: relative; }
.rail-grip-r { left: -10px; right: auto; }
.rail-grip { position: absolute; top: 0; right: -10px; width: 12px; height: 100%; cursor: col-resize; z-index: 6; display: flex; align-items: center; justify-content: center; }
.rail-grip::before { content: ''; width: 4px; height: 46px; border-radius: 3px; background: var(--line); transition: background .15s, height .15s; }
.rail-grip:hover::before, .rail-grip.dragging::before { background: var(--cyan); height: 72px; }
/* Independent per-column scrolling (wide desktop): the header + patient subhead
   stay fixed, and the left rail / center / right rail each scroll on their own
   instead of the whole page moving together. */
@media (min-width: 1321px) {
  main.main { min-height: 0; }
  #view-chart:not(.hidden) { height: calc(100vh - 105px); display: flex; flex-direction: column; overflow: hidden; }
  #view-chart .subhead { position: static; top: auto; }
  #view-chart .chart { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; overflow: hidden; padding-bottom: 0; }
  #view-chart .col { max-height: 100%; overflow-y: auto; overflow-x: hidden; padding-right: 6px; padding-bottom: 26px; scrollbar-gutter: stable; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; will-change: scroll-position; }
  /* Cards must keep their natural height — without this, the flex column shrinks
     them to fit (they're overflow:hidden) and clips their content to blank bars
     instead of letting the column scroll. #historyCards uses display:contents,
     so its cards are the real flex items and must be targeted directly. */
  #view-chart .col > *, #view-chart #historyCards > * { flex-shrink: 0; }
}
/* Wide mode: focus the Problem List — hide sibling rail cards, go two-pane */
.chart.rail-wide .rail-left > .card:not(.pl-card) { display: none; }
.pl-split { display: grid; grid-template-columns: minmax(260px, 300px) 1fr; align-items: start; min-height: 320px; }
.pl-master { min-width: 0; border-right: 1px solid var(--line-2); max-height: 70vh; overflow-y: auto; }
.pl-detail { min-width: 0; padding: 14px 16px; max-height: 70vh; overflow-y: auto; }
.pl-item-sel { background: rgba(48,120,192,.08); box-shadow: inset 3px 0 0 var(--cyan); }
.pl-item-sel .pl-t { color: var(--navy); }
/* Problem detail pane */
.pd-empty { color: var(--ink-3); font-size: 13px; padding: 32px 8px; text-align: center; }
.pd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pd-title { flex: 1 1 auto; min-width: 0; font-size: 14.5px; font-weight: 700; color: var(--navy); line-height: 1.3; overflow-wrap: anywhere; }
.pd-edit { flex: 0 0 auto; font-size: 12px; padding: 5px 11px; }
.pd-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 14px; }
.pd-plan { display: flex; flex-direction: column; gap: 7px; }
.pd-intent-l { font-size: 12px; font-weight: 700; color: var(--ink); }
.pd-intent-l span { font-weight: 400; color: var(--ink-3); }
.pd-intent { width: 100%; padding: 9px 12px; border: 1px solid var(--glass-border); border-radius: 10px; background: rgba(255,255,255,.7); font-size: 13px; }
.pd-intent:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(48,120,192,.15); }
.pd-plan-tools { display: flex; align-items: center; gap: 10px; }
.pd-hint { font-size: 11px; color: var(--ink-3); }
.pd-ap { width: 100%; min-height: 300px; resize: vertical; padding: 16px 18px; border: 1px solid var(--glass-border); border-radius: 12px; background: rgba(255,255,255,.85); font-size: 13.5px; line-height: 1.7; font-family: var(--font); color: var(--ink); }
.pd-ap:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(48,120,192,.15); }
.pd-save { display: flex; justify-content: flex-end; margin-top: 2px; }
.pd-recap { margin-top: 16px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.pd-recap-h { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); margin-bottom: 4px; }
/* Detail-pane chart context (allergies / meds / labs while writing the plan) */
.pd-ctx { margin: 0 0 14px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: rgba(24,36,96,.015); }
.pd-ctx-title { font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); padding: 8px 12px 4px; }
.pd-ctx-sec { border-top: 1px solid var(--line-2); }
.pd-ctx-h { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: none; padding: 7px 12px; cursor: pointer; }
.pd-ctx-h:hover { background: rgba(48,120,192,.05); }
.pd-ctx-lbl { font-size: 12px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.pd-ctx-lbl em { font-style: normal; color: var(--ink-3); font-weight: 600; }
.pd-ctx-sum { flex: 1; min-width: 0; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-ctx-cv { width: 13px; height: 13px; opacity: .5; flex-shrink: 0; }
.pd-ctx-body { padding: 2px 12px 9px; }
.pd-ctx-row { font-size: 12px; color: var(--ink); padding: 3px 0; line-height: 1.35; border-top: 1px solid var(--line-2); }
.pd-ctx-row:first-child { border-top: none; }
.pd-ctx-row b { color: var(--navy); font-weight: 600; }
.pd-ctx-row span { color: var(--ink-3); font-size: 11px; }
.pd-ctx-empty { font-size: 12px; color: var(--ink-3); font-style: italic; padding: 3px 0; }
/* Problem pertinents (meds / labs / imaging & consults) in the quick-view drop-down */
.pl-pertinents { display: flex; flex-direction: column; gap: 11px; margin-bottom: 12px; }
.pp-sec { }
.pp-h { font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); margin-bottom: 5px; }
.pp-body { display: flex; flex-wrap: wrap; gap: 5px 6px; }
.pp-pill { font-size: 11.5px; font-weight: 600; color: var(--navy); background: rgba(48,120,192,.09); border: 1px solid rgba(48,120,192,.16); padding: 2px 9px; border-radius: 999px; }
.pp-pill.pp-changed { color: #15803d; background: rgba(21,128,61,.10); border-color: rgba(21,128,61,.28); }
.pp-chg { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .2px; margin-left: 2px; opacity: .85; }
.pp-lab { font-size: 11.5px; color: var(--ink); background: rgba(14,116,144,.07); border: 1px solid rgba(14,116,144,.15); padding: 2px 9px; border-radius: 7px; white-space: nowrap; }
.pp-lab b { color: #0e7490; font-weight: 700; }
.pp-lab em { color: var(--ink-3); font-style: normal; font-variant-numeric: tabular-nums; }
.pp-trend { font-weight: 800; }
.pp-trend.up { color: var(--danger-text); } .pp-trend.down { color: var(--ok-text); }
.pp-docs .pp-body { flex-direction: column; gap: 4px; }
.pp-doc { display: flex; gap: 8px; font-size: 11.5px; align-items: baseline; }
.pp-doc-d { flex-shrink: 0; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 74px; }
.pp-doc-t { color: var(--ink); }
.pp-doc-t em { color: var(--ink-3); font-style: normal; }
/* Problem activity / change timeline */
.pl-activity, .pd-recap { margin: 0 0 12px; }
.pl-act-h { font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); margin-bottom: 5px; }
.pl-act-list { border-left: 2px solid var(--line); padding-left: 10px; display: flex; flex-direction: column; gap: 5px; }
.pl-act-row { display: flex; align-items: baseline; gap: 8px; font-size: 11.5px; position: relative; }
.pl-act-row::before { content: ''; position: absolute; left: -14px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.pl-act-row.link { cursor: pointer; }
.pl-act-row.link:hover .pl-act-lbl { color: var(--navy); }
.pl-act-ic { flex-shrink: 0; width: 16px; text-align: center; font-size: 11px; line-height: 1; filter: saturate(.9); }
.pl-act-ic.med { color: #7c3aed; } .pl-act-ic.lab { color: #0e7490; } .pl-act-ic.img { color: #b45309; }
.pl-act-ic.plan { color: var(--navy); } .pl-act-ic.bill { color: #15803d; } .pl-act-ic.status,.pl-act-ic.add,.pl-act-ic.note { color: var(--ink-3); }
.pl-act-date { flex-shrink: 0; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 74px; }
.pl-open-plan { margin-top: 8px; display: inline-block; }
.pl-osset { margin: 8px 10px 0 0; display: inline-block; color: var(--cyan-text); }
.pl-osset:hover { text-decoration: underline; }
.pl-act-lbl { color: var(--ink); }
.pl-act-lbl em { font-style: normal; color: var(--ink-3); }
.pl-act-go { color: var(--cyan-text); font-weight: 600; font-size: 10.5px; }
.pl-act-empty { font-size: 11.5px; color: var(--ink-3); font-style: italic; }
/* Conversational plan assistant */
.pa { display: flex; flex-direction: column; gap: 8px; }
/* Mine ↔ Evidence-version toggle */
.pa-seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 2px; gap: 2px; align-self: flex-start; }
.pa-seg-btn { font-size: 12px; font-weight: 600; color: var(--ink-2); background: none; border: none; padding: 5px 12px; border-radius: 7px; cursor: pointer; transition: all .12s; }
.pa-seg-btn.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pa-ev-wrap { display: flex; flex-direction: column; gap: 7px; }
.pa-ev-note { font-size: 11.5px; color: var(--ink-3); }
.pa-ev { background: linear-gradient(180deg,#f6faff,#eef5ff); border-color: #cfe0f5 !important; }
.pa-ev-actions { display: flex; gap: 8px; }
.pa-log { display: flex; flex-direction: column; gap: 5px; max-height: 160px; overflow-y: auto; padding: 2px; }
.pa-msg { font-size: 12px; line-height: 1.35; padding: 6px 10px; border-radius: 10px; max-width: 92%; }
.pa-msg.user { align-self: flex-end; background: var(--cyan); color: #fff; border-bottom-right-radius: 3px; }
.pa-msg.ai { align-self: flex-start; background: rgba(24,36,96,.06); color: var(--ink-2); border-bottom-left-radius: 3px; }
.pa-inputrow { display: flex; gap: 7px; align-items: flex-end; }
.pa-input { flex: 1; resize: vertical; min-height: 40px; padding: 9px 12px; border: 1px solid var(--glass-border); border-radius: 11px; background: rgba(255,255,255,.75); font-size: 13px; font-family: var(--font); line-height: 1.4; }
.pa-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(48,120,192,.15); }
.pa-send { flex-shrink: 0; }
.pa-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pa-note { font-size: 10.5px; color: var(--ink-3); }
.pa-ap { min-height: 200px; }
.pa-save { display: flex; justify-content: flex-end; }
.allergy-row { color: var(--danger); font-weight: 600; }
/* ===== Allergies card (Elation-style: allergen · type icon · reaction · severity) ===== */
.alg-item { display: flex; align-items: center; gap: 8px; padding: 5px 14px; border-bottom: 1px solid var(--line-2); transition: background var(--dur-fast) var(--ease); }
.alg-item:last-child { border-bottom: none; }
.alg-item:hover { background: rgba(48,120,192,.045); }
.alg-item.sev-severe { box-shadow: inset 3px 0 0 var(--danger-text); }
.alg-ic { flex-shrink: 0; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; margin-top: 0; }
.alg-ic i, .alg-ic svg { width: 12px; height: 12px; stroke-width: 2; }
.alg-ic.drug { color: var(--cyan-text); background: rgba(48,120,192,.10); }
.alg-ic.food { color: #b45309; background: rgba(217,119,6,.12); }
.alg-ic.environmental { color: var(--ok-text); background: var(--ok-bg); }
.alg-main { min-width: 0; display: flex; flex-direction: row; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.alg-name { font-size: 12.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.alg-rx { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alg-rx::before { content: '· '; color: var(--ink-3); }
.alg-sev { font-size: 9px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; }
.alg-sev.severe { color: var(--danger-text); background: var(--danger-bg); }
.alg-sev.moderate { color: var(--warn-text); background: var(--warn-bg); }
.alg-sev.mild { color: var(--ink-2); background: rgba(24,36,96,.07); }
.alg-inactive { opacity: .5; }
.alg-inactive .alg-name { text-decoration: line-through; }
.alg-nka { display: flex; align-items: center; gap: 8px; padding: 16px; color: var(--ok-text); font-size: 12.5px; font-weight: 600; }
.alg-nka i, .alg-nka svg { width: 16px; height: 16px; }
.alg-none { padding: 16px; color: var(--ink-3); font-size: 12.5px; }
.alg-none-act { display: flex; gap: 14px; margin-top: 8px; }
/* Card header add button (Allergies + future cards) */
.card > header .card-add { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 12px; font-weight: 650; color: var(--cyan-text); background: rgba(48,120,192,.10); border: 1px solid transparent; padding: 4px 10px; border-radius: var(--r-md); cursor: pointer; transition: background var(--dur-fast) var(--ease); }
.card > header .card-add:hover { background: rgba(48,120,192,.18); }
.card > header .card-add i, .card > header .card-add svg { width: 13px; height: 13px; }
/* Icon-only header actions (e.g. Print, Reconcile) grouped at the right with Add */
.card > header .card-ico { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: var(--ink-3); background: rgba(24,36,96,.05); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: background .14s, color .14s, border-color .14s; }
.card > header .card-ico:hover { background: rgba(48,120,192,.12); color: var(--navy); border-color: var(--cyan); }
.card > header .card-ico i, .card > header .card-ico svg { width: 14px; height: 14px; }
.card > header .card-ico:first-of-type { margin-left: auto; }
.card > header .card-ico ~ .card-add { margin-left: 0; }
/* Row edit affordance — revealed on hover */
.alg-item { position: relative; }
.alg-edit { margin-left: auto; flex-shrink: 0; align-self: center; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; background: none; border: none; color: var(--ink-3); border-radius: 8px; opacity: 0; transition: opacity var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.alg-edit i, .alg-edit svg { width: 14px; height: 14px; }
.alg-item:hover .alg-edit, .alg-item:focus-within .alg-edit { opacity: 1; }
.alg-edit:hover { background: rgba(48,120,192,.12); color: var(--navy); }
@media (hover: none) { .alg-edit { opacity: .5; } }
/* Add / edit allergy modal */
.alg-card { width: 96%; max-width: 520px; }
.alg-form { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; max-height: 70vh; overflow-y: auto; }
.alg-f { display: flex; flex-direction: column; gap: 6px; }
.alg-lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); }
.alg-frow { display: flex; gap: 14px; }
.alg-frow .alg-f { flex: 1; }
.alg-ta { position: relative; }
.alg-ta input, .alg-form input[type=date], .alg-form textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--glass-border); border-radius: var(--r-md); background: rgba(255,255,255,.75); font-size: 13.5px; font-family: inherit; }
.alg-ta .ta-drop { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; margin-top: 3px; max-height: 240px; overflow-y: auto; background: var(--glass-strong); backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md); }
.alg-rxnorm { font-size: 10.5px; color: var(--cyan-text); font-weight: 650; font-variant-numeric: tabular-nums; }
.alg-rxpick { display: flex; flex-wrap: wrap; gap: 6px; }
.alg-rxchip { font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: rgba(24,36,96,.06); border: 1px solid transparent; padding: 4px 10px; border-radius: 999px; cursor: pointer; transition: background var(--dur-fast) var(--ease); }
.alg-rxchip:hover { background: rgba(48,120,192,.10); }
.alg-rxchip.on { background: rgba(48,120,192,.16); color: var(--cyan-text); border-color: var(--cyan); font-weight: 700; }
.alg-rxcustom { margin-top: 6px; }
.alg-del { color: var(--danger-text); border-color: var(--danger-border); }
.alg-del:hover { background: var(--danger-bg); }

/* ===== Patient history cards (PMH, surgical, family, social, cognitive, psych, immun) ===== */
#historyCards { display: contents; }
#historyCards .card { margin-top: 14px; }
.hist-empty { padding: 12px 16px; color: var(--ink-3); font-size: 12px; }
.hist-item { display: flex; align-items: flex-start; gap: 9px; padding: 8px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background var(--dur-fast) var(--ease); }
.hist-item:last-child { border-bottom: none; }
.hist-item:hover { background: rgba(48,120,192,.045); }
.hist-ic { flex-shrink: 0; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: rgba(48,120,192,.10); color: var(--cyan-text); margin-top: 1px; }
.hist-ic i, .hist-ic svg { width: 13px; height: 13px; }
.hist-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.hist-t { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.hist-sub { font-size: 11px; color: var(--ink-2); }
.hist-tag { font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-3); background: rgba(24,36,96,.07); padding: 1px 6px; border-radius: 999px; align-self: center; }
.hist-cvx { font-size: 9.5px; font-weight: 650; color: var(--ink-3); font-family: var(--mono); align-self: center; white-space: nowrap; }
.hist-resolved .hist-t { color: var(--ink-2); text-decoration: line-through; }
.hist-edit { width: 13px; height: 13px; color: var(--ink-3); opacity: 0; align-self: center; flex-shrink: 0; transition: opacity var(--dur-fast) var(--ease); }
.hist-item:hover .hist-edit { opacity: 1; }
.hist-del { display: inline-flex; align-items: center; justify-content: center; border: none; background: none; padding: 3px; margin: -2px -2px -2px 0; border-radius: 6px; color: var(--ink-3); cursor: pointer; opacity: 0; align-self: center; flex-shrink: 0; transition: opacity var(--dur-fast) var(--ease), color .12s, background .12s; }
.hist-del i, .hist-del svg { width: 13px; height: 13px; }
.hist-item:hover .hist-del { opacity: .75; }
.hist-del:hover { opacity: 1; color: var(--danger-text); background: var(--danger-bg); }
/* inline add-row (Elation-style click-to-add line) */
.hist-addrow { display: flex; align-items: center; gap: 7px; padding: 8px 16px; font-size: 12px; font-weight: 600; color: var(--ink-3); cursor: pointer; border-top: 1px dashed var(--line-2); transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.hist-addrow:hover, .hist-addrow:focus-visible { background: rgba(48,120,192,.06); color: var(--navy); outline: none; }
.hist-addrow i, .hist-addrow svg { width: 13px; height: 13px; }
.hist-addrow.editing { cursor: default; padding: 6px 12px 6px 16px; gap: 6px; background: rgba(48,120,192,.05); }
.hist-addinp { flex: 1; min-width: 0; border: 1px solid var(--cyan); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 12.5px; background: #fff; }
.hist-addinp:focus { outline: none; box-shadow: 0 0 0 3px rgba(48,120,192,.16); }
.hist-addx { border: none; background: none; color: var(--ink-3); cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.hist-addx:hover { color: var(--danger-text); background: var(--danger-bg); }
/* medications (native editable list) */
.med-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background var(--dur-fast) var(--ease); }
.med-item:last-of-type { border-bottom: none; }
.med-item:hover { background: rgba(48,120,192,.045); }
/* Numbered index badge — gives the list clear ordering + a modern medication-list feel */
.med-num { flex: 0 0 auto; align-self: center; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; color: var(--cyan-text); background: rgba(48,120,192,.10); border-radius: 6px; font-variant-numeric: tabular-nums; }
.med-held .med-num { color: var(--warn-text); background: var(--warn-bg); }
.med-item:hover .med-num { background: rgba(48,120,192,.18); }
/* ═══ Multi-select refill/send (Elation-style batch Rx) ═══ */
.card > header .card-ico.on { background: var(--cyan); color: #fff; border-color: transparent; }
.med-ck { flex: 0 0 auto; align-self: center; display: inline-flex; }
.med-ck input { width: 15px; height: 15px; accent-color: var(--cyan); cursor: pointer; }
.med-item.med-selected { background: rgba(48,120,192,.07); }
.med-selbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 7px; padding: 8px 14px; background: rgba(48,120,192,.08); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(48,120,192,.25); }
.med-selcount { font-size: 12px; color: var(--ink-2); } .med-selcount b { color: var(--navy); font-size: 13px; }
.med-selsp { flex: 1; }
.med-selact { font: inherit; font-size: 11.5px; font-weight: 700; color: var(--ink-2); background: none; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.med-selact:hover { color: var(--navy); border-color: var(--cyan); }
.med-selgo { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12px; font-weight: 700; color: #fff; background: var(--cyan); border: none; border-radius: 9px; padding: 5px 13px; cursor: pointer; box-shadow: 0 2px 8px rgba(48,120,192,.3); }
.med-selgo:hover { background: var(--cyan-deep, var(--cyan)); }
.med-selgo.disabled { opacity: .45; pointer-events: none; }
.med-selgo i, .med-selgo svg { width: 13px; height: 13px; }
/* ═══ Prescription Form composer (Elation IA · WellPlus design) ═══ */
/* Resizable (custom SE grip — drag any direction) + draggable (title bar) window */
.modal-card.rxp-card { position: relative; flex: 0 0 auto; width: 1280px; height: 700px; max-width: none; min-width: 680px; min-height: 480px; overflow: hidden; display: flex; flex-direction: column; background: #fbfcff; backdrop-filter: none; box-shadow: 0 30px 90px -14px rgba(15,25,55,.5), 0 8px 24px rgba(15,25,55,.25); }
@media (max-width: 1100px) { .rxp-card { width: 94vw; } }
.rxp-resize { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; z-index: 5; }
.rxp-resize::after { content: ''; position: absolute; right: 5px; bottom: 5px; width: 10px; height: 10px; border-right: 2.5px solid var(--ink-3); border-bottom: 2.5px solid var(--ink-3); border-radius: 2px; opacity: .55; }
.rxp-resize:hover::after { opacity: 1; border-color: var(--cyan); }
/* Narrow window: NOTHING disappears — the rails compact instead */
.rxp-card.narrow .rxp-body { grid-template-columns: 164px minmax(0, 1fr) 186px; }
.rxp-card.narrow .rxp-ctx { padding: 12px 10px; }
.rxp-card.narrow .rxp-ctx .rxp-ctx-b, .rxp-card.narrow .rxp-int { font-size: 11px; }
.rxp-card.narrow .rxp-tab-t span:last-child { display: none; }
/* edge resize handles — grab any side of the window */
.rxp-edge { position: absolute; z-index: 6; }
.rxp-edge-e { top: 0; right: -3px; width: 9px; height: 100%; cursor: ew-resize; }
.rxp-edge-w { top: 0; left: -3px; width: 9px; height: 100%; cursor: ew-resize; }
.rxp-edge-s { left: 0; bottom: -3px; height: 9px; width: 100%; cursor: ns-resize; }
.rxp-edge:hover { background: rgba(48,120,192,.14); }
.rxp-resize { width: 26px; height: 26px; }
.rxp-card .modal-head, .rxp-card .rxp-pharm, .rxp-card .modal-foot { flex: 0 0 auto; }
.rxp-med-row { display: flex; align-items: flex-start; gap: 10px; }
.rxp-doses { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.rxp-doses:empty { display: none; }
.rxp-doses-l { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); margin-right: 2px; }
.rxp-doses-l i, .rxp-doses-l svg { width: 12px; height: 12px; }
/* order-set panel */
.rxp-dxs { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.rxp-osbox:empty { display: none; }
.rxp-osbox { margin-top: 9px; border: 1.5px solid rgba(48,120,192,.35); border-radius: 13px; padding: 12px 14px; background: rgba(48,120,192,.04); display: flex; flex-direction: column; gap: 8px; }
.os-head { display: flex; align-items: baseline; gap: 9px; }
.os-t { font-size: 13.5px; font-weight: 800; color: var(--navy); }
.os-cite { font-size: 10px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .4px; }
.os-branch { font-size: 12px; font-weight: 700; color: var(--cyan-text); }
.os-branches { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 4px; }
.os-branch-chip { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); cursor: pointer; text-align: left; }
.os-branch-chip:hover { border-color: var(--cyan-text); color: var(--cyan-text); }
.os-branch-chip.on { background: var(--cyan-soft, #e0f5f7); border-color: var(--cyan-text); color: var(--cyan-text); font-weight: 700; }
.os-why { display: flex; flex-wrap: wrap; gap: 5px; }
.os-why-chip { font-size: 10.5px; font-weight: 700; color: #2c7a4b; background: rgba(44,122,75,.1); padding: 2px 9px; border-radius: 999px; }
.os-warns { display: flex; flex-direction: column; gap: 4px; }
.os-warn { font-size: 11.5px; font-weight: 600; color: #92600a; background: rgba(245,158,11,.12); border-radius: 8px; padding: 5px 9px; }
.os-meds { display: flex; flex-direction: column; gap: 7px; }
.os-med { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.75); }
.os-med input { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 2px; accent-color: var(--cyan); cursor: pointer; }
.os-med-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.os-med b { font-size: 12.5px; color: var(--ink); }
.os-med em { font-style: normal; font-size: 11px; color: var(--ink-2); }
.os-med.os-alt { background: rgba(24,36,96,.025); border-style: dashed; }
.os-med.os-blocked { opacity: .55; }
.os-flag { display: block; font-style: normal; font-size: 10.5px; font-weight: 700; color: #2c7a4b; }
.os-flag.qt { color: #92600a; }
.os-flag.block { color: var(--danger-text); }
.os-alth { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); margin-top: 2px; }
.os-alts, .os-extra { font-size: 11px; color: var(--ink-2); line-height: 1.45; }
.os-alts { color: var(--ink-3); }
.os-load { align-self: flex-start; margin-top: 3px; }
.rxp-qtyhint { font-size: 10px; color: var(--cyan-text); font-weight: 600; margin-top: 3px; min-height: 12px; }
.rxp-doses-combo { font-style: normal; font-weight: 700; color: #b45309; background: rgba(245,158,11,.12); padding: 1px 7px; border-radius: 999px; letter-spacing: .3px; }
.rxp-dose { font: inherit; font-size: 12px; font-weight: 700; color: var(--ink-2); background: rgba(255,255,255,.85); border: 1.5px solid var(--line); border-radius: 9px; padding: 4px 12px; cursor: pointer; transition: border-color .13s, background .13s, color .13s; }
.rxp-dose:hover { border-color: rgba(48,120,192,.55); color: var(--navy); }
.rxp-dose.on { border-color: var(--cyan); background: rgba(48,120,192,.10); color: var(--navy); box-shadow: 0 0 0 2px rgba(48,120,192,.12); }
.rxp-tab-type.chg { color: #b45309; }
/* ═══ Medication detail window ═══ */
.modal-card.mdd-card { max-width: 620px; background: #fbfcff; backdrop-filter: none; box-shadow: 0 30px 90px -14px rgba(15,25,55,.5), 0 8px 24px rgba(15,25,55,.25); }
.mdd-st { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 3px 9px; border-radius: 999px; color: #2c7a4b; background: rgba(44,122,75,.12); }
.mdd-st.held { color: var(--warn-text); background: var(--warn-bg); }
.mdd-st.dc { color: var(--ink-3); background: rgba(24,36,96,.08); }
.mdd-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); background: rgba(24,36,96,.02); }
.mdd-actions .cal-btn { padding: 6px 12px; font-size: 12px; }
.mdd-body { max-height: 58vh; }
.mdd-sec { border: 1px solid var(--line-2); border-radius: 13px; padding: 12px 14px; background: rgba(255,255,255,.65); }
.mdd-h { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }
.mdd-n { font-size: 10px; font-weight: 800; color: var(--cyan-text); background: rgba(48,120,192,.1); padding: 1px 7px; border-radius: 999px; }
.mdd-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.mdd-kv > div { display: flex; flex-direction: column; gap: 1px; }
.mdd-kv span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); }
.mdd-kv b { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.mdd-script { display: flex; align-items: flex-start; gap: 11px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.mdd-script:first-of-type { border-top: none; }
.mdd-s-when { flex: 0 0 auto; display: flex; flex-direction: column; min-width: 84px; }
.mdd-s-when b { font-size: 12px; color: var(--navy); }
.mdd-s-when span { font-size: 10.5px; color: var(--ink-3); }
.mdd-s-mid { flex: 1; min-width: 0; }
.mdd-s-t { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.mdd-s-sub { font-size: 11px; color: var(--ink-2); }
.mdd-fill-note { display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; color: var(--ink-2); line-height: 1.5; }
.mdd-fill-note i, .mdd-fill-note svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--cyan-text); margin-top: 1px; }
.med-date { font-size: 10px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
/* med list segmentation (Permanent Rx / OTC / Temporary) */
.med-seg { display: flex; align-items: center; gap: 6px; padding: 8px 16px 4px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); background: rgba(24,36,96,.02); border-bottom: 1px solid var(--line-2); }
.med-seg-n { font-size: 9.5px; font-weight: 800; color: var(--cyan-text); background: rgba(48,120,192,.1); padding: 0 6px; border-radius: 999px; }
.med-doc { font-size: 8px; font-weight: 800; letter-spacing: .4px; color: #7c4dff; background: rgba(124,77,255,.1); padding: 1px 6px; border-radius: 999px; }
.med-addbar { display: flex; align-items: stretch; border-top: 1px dashed var(--line-2); }
.med-addbar .hist-addrow { border-top: none; flex: 1; }
.med-addbar .hist-addrow + .hist-addrow { border-left: 1px solid var(--line-2); flex: 0 0 auto; }
/* Rx-request prescriber inbox */
.rxq-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.rxq-main { flex: 1; min-width: 0; }
.rxq-t { font-size: 13px; color: var(--ink); } .rxq-t b { color: var(--navy); }
.rxq-s { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; } .rxq-s em { color: #7c4dff; font-style: normal; font-weight: 600; }
.rxq-acts { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.rxq-acts .cal-btn { padding: 5px 11px; font-size: 12px; }
/* scripts since last 6 visits */
.med-scripts6 .med-past-link { width: 100%; background: none; border: none; border-top: 1px solid var(--line-2); font: inherit; }
.med-scripts6-body { border-top: 1px solid var(--line-2); background: rgba(24,36,96,.02); }
.med-s6-h { padding: 7px 16px 2px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); }
.rxp-headn { font-size: 12px; font-weight: 700; color: var(--cyan-text); background: rgba(48,120,192,.10); padding: 3px 10px; border-radius: 999px; margin-left: 10px; margin-right: auto; }
/* Vertical Rx tab rail — Elation's chip stack, one tab per prescription */
.rxp-rail { display: flex; flex-direction: column; gap: 7px; padding: 13px 12px; overflow-y: auto; scrollbar-width: thin; border-right: 1px solid var(--line-2); background: rgba(24,36,96,.025); }
.rxp-tab { display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left; font: inherit; background: rgba(255,255,255,.85); border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 10px; cursor: pointer; transition: border-color .14s, box-shadow .14s, background .14s; }
.rxp-tab:hover { border-color: rgba(48,120,192,.5); }
.rxp-tab.on { border-color: var(--cyan); background: rgba(48,120,192,.07); box-shadow: 0 0 0 3px rgba(48,120,192,.12); }
.rxp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.rxp-dot.ok { background: #2c9c6a; } .rxp-dot.inc { background: #d97706; }
.rxp-tab-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.rxp-tab-type { font-size: 8.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--cyan-text); }
.rxp-tab-t b { font-size: 12.5px; font-weight: 700; color: var(--navy); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.rxp-tab-t span:last-child { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rxp-chip-x { flex-shrink: 0; font-size: 12px; color: var(--ink-3); padding: 2px 4px; border-radius: 6px; }
.rxp-chip-x:hover { color: var(--danger-text); background: var(--danger-bg); }
.rxp-tab-add { color: var(--cyan-text); font-size: 12px; font-weight: 700; border-style: dashed; background: none; align-items: center; justify-content: center; gap: 5px; }
.rxp-tab-add i, .rxp-tab-add svg { width: 13px; height: 13px; }
.rxp-body { display: grid; grid-template-columns: var(--c1, 236px) var(--c2, 204px) minmax(0, 1fr) var(--c4, 224px); gap: 0; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.rxp-card.nomeds .rxp-body { grid-template-columns: var(--c2, 204px) minmax(0, 1fr) var(--c4, 224px); }
.rxp-colgrip { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 6; }
.rxp-colgrip.left { left: -4px; right: auto; }
.rxp-colgrip:hover::after, .rxp-colgrip.drag::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: var(--cyan-text, #1b7f8c); }
.rxp-card.nomeds .rxp-meds { display: none; }
.rxp-meds { border-right: 1px solid var(--line-2); background: rgba(24,36,96,.035); overflow-y: auto; scrollbar-width: thin; padding: 11px 10px; display: flex; flex-direction: column; gap: 6px; }
.rxm-h { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); padding: 2px 2px 4px; display: flex; align-items: center; gap: 6px; }
.rxm-n { background: var(--cyan-soft, #e0f5f7); color: var(--cyan-text); border-radius: 999px; padding: 0 7px; font-size: 10px; }
.rxm-row { display: flex; align-items: flex-start; gap: 4px; padding: 6px 7px; border-radius: 9px; background: #fff; border: 1px solid var(--line-2); }
.rxm-row.held { background: #fdf9ee; }
.rxm-row.dc { opacity: .62; }
.rxm-main { flex: 1 1 auto; min-width: 0; }
.rxm-name { font: inherit; font-size: 12px; font-weight: 700; color: var(--ink); background: none; border: none; padding: 0; cursor: pointer; text-align: left; line-height: 1.25; }
.rxm-name:hover { color: var(--cyan-text); text-decoration: underline; }
.rxm-sub { font-size: 10.5px; color: var(--ink-3); line-height: 1.35; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; }
.rxm-heldt { color: #b07d10; font-size: 9px; } .rxm-dct { color: #a02c20; font-size: 9px; }
.rxm-acts { display: flex; gap: 2px; flex: 0 0 auto; }
.rxm-b { background: none; border: none; padding: 3px; border-radius: 6px; cursor: pointer; color: var(--ink-3); }
.rxm-b:hover { background: var(--cyan-soft, #e0f5f7); color: var(--cyan-text); }
.rxm-b i, .rxm-b svg { width: 13px; height: 13px; }
.rxm-empty { font-size: 12px; color: var(--ink-3); padding: 8px 4px; }
.rxm-toggle { font: inherit; font-size: 11px; color: var(--ink-3); background: none; border: none; cursor: pointer; padding: 5px 2px; text-align: left; }
.rxm-toggle:hover { color: var(--cyan-text); }
.rxp-form { min-width: 0; }
.rxp-med-new { padding-bottom: 0; }
.rxp-sigq { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; align-items: center; }
.rxp-sigq-b { font: inherit; font-size: 10px; font-weight: 800; letter-spacing: .3px; color: var(--cyan-text); background: rgba(48,120,192,.08); border: 1px solid transparent; border-radius: 7px; padding: 3px 9px; cursor: pointer; }
.rxp-adminh { display: block; margin-top: 5px; font: inherit; font-size: 11px; font-weight: 600; text-align: left; color: #6b5210; background: #fdf6e3; border: 1px solid #ecd690; border-radius: 7px; padding: 4px 10px; cursor: pointer; max-width: 100%; }
.rxp-adminh:hover { background: #fbf0d6; }
.rxp-sigcount { font-size: 10px; font-weight: 700; color: var(--ink-faint, #8a979d); margin-left: 6px; }
.rxp-sigcount.over { color: #a02c20; }
.rxp-esb { color: var(--ink-faint, #8a979d); background: transparent; border: 1px solid var(--line, #e3e9eb); margin-left: auto; }
.rxp-esb:hover { color: var(--cyan-text); border-color: var(--cyan-text); }
.rxp-esb.on { color: var(--cyan-text); background: rgba(48,120,192,.08); border-color: transparent; }
.rxp-espreview { margin-top: 4px; font-size: 12px; color: var(--ink-soft, #4a5a61); background: var(--bg, #f5f8f9); border: 1px dashed var(--line, #dde3e6); border-radius: 7px; padding: 5px 9px; }
.rxp-sigq-b:hover { background: rgba(48,120,192,.18); }
.rxp-int.allergy { background: var(--danger-bg); color: var(--danger-text); font-weight: 800; border: 1px solid rgba(200,40,40,.35); }
.rxp-form { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.rxp-med { display: flex; align-items: baseline; gap: 9px; padding-bottom: 4px; }
.rxp-med-n { font-size: 16px; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.rxp-med-ref { font-size: 11px; color: var(--ink-3); margin-left: auto; }
.rxp-grid { display: grid; grid-template-columns: 96px minmax(120px, 1fr) 96px 116px; gap: 12px; }
.rxp-form input, .rxp-form select { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.9); font-size: 13px; font-family: inherit; color: var(--ink); transition: border-color .14s, box-shadow .14s; }
.rxp-form input:focus, .rxp-form select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(48,120,192,.14); background: #fff; }
.rxp-dx { appearance: auto; }
.rxp-daw { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.rxp-daw input { width: auto; accent-color: var(--cyan); }
.rxp-ctx { border-left: 1px solid var(--line-2); background: rgba(24,36,96,.02); padding: 14px 15px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.rxp-ctx-h { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); margin-bottom: 5px; }
.rxp-ctx-b { font-size: 12px; color: var(--ink-2); line-height: 1.45; display: flex; flex-wrap: wrap; gap: 5px; }
.rxp-none { color: var(--ink-3); font-size: 11.5px; font-style: italic; }
.rxp-alg { font-size: 11px; font-weight: 700; color: var(--danger-text); background: var(--danger-bg); padding: 2px 9px; border-radius: 999px; }
.rxp-cov { font-weight: 600; color: var(--ink); }
.rxp-int { font-size: 11.5px; line-height: 1.4; padding: 6px 9px; border-radius: 8px; background: rgba(245,158,11,.1); color: #92600a; width: 100%; }
.rxp-int.high { background: var(--danger-bg); color: var(--danger-text); font-weight: 600; }
.rxp-warn .rxp-ctx-h { color: #b45309; }
.rxp-warn { background: rgba(245,158,11,.08); border-radius: 10px; padding: 10px 11px; margin: 0 -4px; }
.rxp-pharm { display: flex; align-items: center; gap: 9px; padding: 10px 20px; border-top: 1px solid var(--line-2); }
.rxp-pharm i, .rxp-pharm svg { width: 15px; height: 15px; color: var(--cyan-text); flex-shrink: 0; }
.rxp-pharm input { flex: 1; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.9); font-size: 12.5px; font-family: inherit; }
.rxp-pharm input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(48,120,192,.14); }
.rxp-status { font-size: 12px; font-weight: 700; }
.rxp-ok { color: #2c7a4b; } .rxp-inc { color: #b45309; }
/* Rx cart modal rows */
.rxc-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.6); }
.rxc-drug { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.rxc-name { font-size: 13px; font-weight: 700; color: var(--navy); flex: 1; min-width: 0; }
.rxc-x { opacity: .6; } .rxc-row:hover .rxc-x { opacity: 1; }
.rxc-grid { display: grid; grid-template-columns: 1fr 64px 64px 64px; gap: 8px; }
.rxc-grid input { padding: 7px 9px; font-size: 12.5px; }
.rxc-note { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-2); background: rgba(48,120,192,.06); border-radius: 9px; padding: 7px 10px; }
.rxc-note i, .rxc-note svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--cyan-text); }
.rxc-count { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.med-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.med-t { font-size: 12.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.med-sub { font-size: 11px; color: var(--ink-2); }
.med-ctrl { font-size: 8.5px; font-weight: 800; color: var(--danger-text); background: var(--danger-bg); border-radius: 4px; padding: 0 4px; letter-spacing: .3px; }
.med-tag { font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-3); background: rgba(24,36,96,.07); padding: 1px 6px; border-radius: 999px; align-self: center; }
.med-dc .med-t { color: var(--ink-2); text-decoration: line-through; }
.med-held .med-t { color: var(--warn-text); }
.med-acts { display: inline-flex; align-items: center; gap: 4px; align-self: center; flex-shrink: 0; }
.med-edit { width: 13px; height: 13px; color: var(--ink-3); opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
.med-item:hover .med-edit { opacity: 1; }
.med-act { display: inline-flex; align-items: center; justify-content: center; border: none; background: none; padding: 3px; border-radius: 6px; color: var(--ink-3); cursor: pointer; opacity: .55; transition: opacity var(--dur-fast) var(--ease), color .12s, background .12s; }
.med-act i, .med-act svg { width: 15px; height: 15px; }
.med-item:hover .med-act { opacity: 1; }
.med-act:hover { opacity: 1; color: var(--navy); background: rgba(48,120,192,.12); }
/* prescriptions (eRx workspace) */
.rx-sec { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 4px; }
.rx-h { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); padding: 6px 16px 3px; }
.rx-native { color: var(--warn-text); font-weight: 600; text-transform: none; letter-spacing: 0; }
.rx-item { display: flex; align-items: flex-start; gap: 9px; padding: 7px 16px; }
.rx-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.rx-t { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.rx-sub { font-size: 11px; color: var(--ink-2); }
.rx-tag { font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 1px 6px; border-radius: 999px; align-self: center; }
.rx-tag.draft { color: var(--ink-3); background: rgba(24,36,96,.07); }
.rx-tag.queued { color: var(--warn-text); background: var(--warn-bg); }
.rx-tag.sent { color: var(--ok-text); background: var(--ok-bg); }
.rx-tag.dc { color: var(--ink-3); background: rgba(24,36,96,.05); }
.rx-acts { display: inline-flex; gap: 3px; align-self: center; }
.rx-acts .med-act { opacity: .8; }
.rx-banner { display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: var(--warn-text); background: var(--warn-bg); border: 1px solid rgba(180,120,20,.2); border-radius: 10px; padding: 8px 10px; }
.rx-banner i, .rx-banner svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.alg-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.alg-check input { width: 15px; height: 15px; }
/* smart Rx modal: presets, favorites, sig builder, sizes, peds calc */
.rx-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.rx-quick-lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-3); margin-right: 2px; }
.rx-chip { font-size: 11.5px; font-weight: 600; color: var(--navy); background: rgba(48,120,192,.09); border: 1px solid rgba(48,120,192,.18); padding: 3px 10px; border-radius: 999px; cursor: pointer; transition: background .12s; }
.rx-chip:hover { background: rgba(48,120,192,.18); }
.rx-chip.fav { color: #8a6d00; background: rgba(212,160,20,.12); border-color: rgba(212,160,20,.3); }
.rx-sig-build { display: flex; gap: 14px; }
.rx-sig-build .rx-sb-dose { max-width: 90px; flex: 0 0 90px; }
.rx-sizes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.rx-size { font-size: 11px; font-weight: 600; color: var(--ink-2); background: rgba(24,36,96,.05); border: 1px solid var(--line-2); padding: 2px 8px; border-radius: 7px; cursor: pointer; }
.rx-size:hover { background: rgba(48,120,192,.12); color: var(--navy); }
.rx-fav-btn { color: #8a6d00 !important; }
.rx-peds { border: 1px solid rgba(48,120,192,.22); background: rgba(48,120,192,.05); border-radius: 12px; padding: 10px 12px; }
.rx-peds-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.rx-peds-h i, .rx-peds-h svg { width: 15px; height: 15px; }
.rx-peds-none { font-size: 11.5px; color: var(--ink-3); }
.rx-peds-row { display: flex; gap: 10px; align-items: flex-end; }
.rx-peds-calc { flex-shrink: 0; }
.rx-peds-out { margin-top: 8px; }
.rx-peds-result { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; }
.rx-peds-result b { color: var(--navy); }
.rx-peds-conc { color: var(--ink-3); font-size: 11px; }
.rx-peds-use { margin-left: auto; }
/* allergy alert at prescribe */
.rx-allergy { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--danger-text); background: var(--danger-bg); border: 1px solid rgba(200,40,40,.3); border-radius: 10px; padding: 8px 10px; font-weight: 500; }
.rx-allergy i, .rx-allergy svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.rx-allergy b { font-weight: 800; }
/* Settings → Security (2FA) */
.set-sec-card { max-width: 560px; background: var(--surface, #fff); border: 1px solid var(--line-2); border-radius: 14px; padding: 20px 22px; }
.set-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set-sec-h h2 { margin: 0; font-size: 17px; }
.set-sec-badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.set-sec-badge.on { color: #2c7a4b; background: rgba(44,122,75,.12); }
.set-sec-badge.off { color: var(--ink-3); background: rgba(0,0,0,.05); }
.set-sec-desc { color: var(--ink-2); font-size: 13px; line-height: 1.5; margin: 10px 0 16px; }
.set-2fa-enroll { border-top: 1px solid var(--line-2); padding-top: 14px; }
.set-2fa-steps { margin: 0 0 12px; padding-left: 18px; color: var(--ink-1); font-size: 13.5px; }
.set-2fa-qr { display: block; border: 1px solid var(--line-2); border-radius: 12px; padding: 8px; background: #fff; }
.set-2fa-manual { font-size: 12px; color: var(--ink-2); margin: 12px 0; }
.set-2fa-manual code { background: rgba(0,0,0,.05); padding: 3px 7px; border-radius: 6px; font-size: 12.5px; letter-spacing: 1px; user-select: all; }
.set-2fa-verify { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.set-2fa-input { width: 130px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; letter-spacing: 4px; text-align: center; outline: none; }
.set-2fa-err { color: var(--danger); font-size: 12.5px; margin-top: 8px; min-height: 16px; }
.set-2fa-backup-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-1); }
.set-2fa-low { color: var(--danger); }
.set-2fa-codes { list-style: none; margin: 14px 0; padding: 14px 16px; background: rgba(0,0,0,.03); border: 1px solid var(--line-2); border-radius: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; letter-spacing: 1px; user-select: all; }
.set-2fa-codes li { padding: 2px 0; }
/* interaction / duplicate-therapy safety screen */
.rx-safety { border: 1px solid rgba(180,120,10,.35); background: #fff8ec; border-radius: 10px; padding: 8px 10px; font-size: 12px; color: #6b4e10; }
.rx-safety.sev-high { border-color: rgba(200,40,40,.35); background: var(--danger-bg); color: var(--danger-text); }
.rx-safety-h { display: flex; align-items: center; gap: 6px; font-weight: 800; margin-bottom: 4px; }
.rx-safety-h i, .rx-safety-h svg { width: 15px; height: 15px; }
.rx-safety-row { padding: 2px 0 2px 20px; line-height: 1.35; }
.rx-safety-row.high { color: var(--danger-text); font-weight: 600; }
.rx-safety-row.mod { color: #8a5a10; }
.rx-safety-row.dup { color: #7a5cb0; }
.rx-safety-row b { font-weight: 800; }
/* discontinue reason picker */
.dc-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-reason { font-size: 12px; font-weight: 600; color: var(--ink-2); background: rgba(24,36,96,.05); border: 1px solid var(--line-2); padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.dc-reason:hover { background: rgba(48,120,192,.1); color: var(--navy); }
.dc-reason.on { background: var(--navy); color: #fff; border-color: var(--navy); }
/* per-med history */
.med-hist { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 8px; }
.med-hist-h { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); margin-bottom: 5px; }
.med-hist-row { display: flex; gap: 8px; font-size: 11.5px; color: var(--ink); padding: 2px 0; }
.med-hist-d { flex-shrink: 0; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 74px; }
/* medication reconciliation */
.med-recon { display: flex; align-items: center; gap: 8px; margin: 4px 12px 6px; padding: 7px 11px; font-size: 12px; font-weight: 600; color: var(--warn-text); background: var(--warn-bg); border: 1px solid rgba(180,120,20,.25); border-radius: 9px; cursor: pointer; }
.med-recon:hover { filter: brightness(.98); }
.med-recon i, .med-recon svg { width: 15px; height: 15px; }
.recon-hint { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.recon-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.recon-main { flex: 1; min-width: 0; }
.recon-t { font-size: 13px; font-weight: 600; color: var(--ink); }
.recon-imp { font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--warn-text); background: var(--warn-bg); padding: 1px 5px; border-radius: 999px; }
.recon-sub { font-size: 11px; color: var(--ink-2); }
.recon-seg { flex-shrink: 0; }
.recon-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.recon-keep { padding: 4px 12px; }
.recon-chip { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 2px 7px; border-radius: 999px; }
.recon-chip.pend { color: var(--ink-3); background: rgba(24,36,96,.06); }
.recon-chip.keep { color: var(--ok-text); background: var(--ok-bg); }
.recon-chip.chg { color: var(--navy); background: rgba(48,120,192,.12); }
.recon-chip.dc { color: var(--danger-text); background: var(--danger-bg); }
.recon-count { font-size: 11.5px; color: var(--ink-3); }
.recon-more { display: inline-flex; align-items: center; gap: 3px; padding: 4px 10px; }
.recon-more i, .recon-more svg { width: 13px; height: 13px; }
/* per-medication action menu (Elation-style) */
.med-menu { position: fixed; z-index: 10000; min-width: 208px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 12px 32px rgba(24,36,96,.18); padding: 5px; }
.mm-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: none; border: none; font: inherit; font-size: 13px; color: var(--ink); padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.mm-item:hover { background: rgba(48,120,192,.10); color: var(--navy); }
.mm-item.danger { color: var(--danger-text); }
.mm-item.danger:hover { background: var(--danger-bg); }
.mm-item i, .mm-item svg { width: 15px; height: 15px; }
.mm-sep { height: 1px; background: var(--line-2); margin: 4px 6px; }
/* past medications & history */
.med-reconwhen { display: flex; align-items: center; gap: 6px; padding: 6px 16px; font-size: 11px; font-weight: 600; color: var(--ok-text, #2c7a4b); background: rgba(44,122,75,.06); border-top: 1px solid var(--line-2); }
.med-reconwhen i, .med-reconwhen svg { width: 13px; height: 13px; }
.med-foot { display: flex; align-items: stretch; border-top: 1px solid var(--line-2); }
.med-foot .med-past-link { border-top: none; flex: 1; }
.med-foot .med-past-link + .med-past-link { border-left: 1px solid var(--line-2); flex: 0 0 auto; }
.med-past-link { display: flex; align-items: center; gap: 7px; padding: 9px 16px; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; border-top: 1px solid var(--line-2); }
.med-past-link:hover { background: rgba(48,120,192,.05); color: var(--navy); }
.med-past-link i, .med-past-link svg { width: 14px; height: 14px; }
.pm-h { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); margin-bottom: 5px; }
.pm-item { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.pm-item:hover { background: rgba(48,120,192,.04); }
.pm-main { flex: 1; min-width: 0; }
.pm-t { font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: line-through; }
.pm-sub { font-size: 11px; color: var(--ink-3); }
.pm-item .med-edit { opacity: .6; }
.mh-note { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; color: var(--ink-2); background: rgba(48,120,192,.05); border-radius: 8px; padding: 7px 9px; margin-bottom: 8px; }
.mh-note i, .mh-note svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
/* social grid */
.soc-grid { display: flex; flex-direction: column; padding: 6px 0; }
.soc-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 16px; }
.soc-ic { flex-shrink: 0; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: rgba(24,36,96,.05); color: var(--ink-2); }
.soc-ic i, .soc-ic svg { width: 13px; height: 13px; }
.soc-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-3); }
.soc-val { font-size: 12.5px; color: var(--ink); }
.soc-row.soc-alert .soc-ic { background: var(--warn-bg); color: var(--warn-text); }
.soc-row.soc-alert .soc-val { color: var(--warn-text); font-weight: 600; }
/* structured social modal */
.soc-sec { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.soc-sec-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--navy); }
.soc-sec-h i, .soc-sec-h svg { width: 14px; height: 14px; color: var(--ink-2); }
.soc-sub { display: flex; flex-direction: column; gap: 10px; }
.soc-calc { font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 6px 10px; border-radius: 8px; background: rgba(24,36,96,.04); }
.soc-calc.on { color: var(--navy); background: rgba(48,120,192,.10); }
.soc-hint { font-size: 11px; color: var(--ink-3); font-style: italic; }
.soc-hint b { font-style: normal; font-weight: 650; color: var(--ink-2); }
.soc-screen { flex-shrink: 0; white-space: nowrap; }
.soc-screen i, .soc-screen svg { width: 13px; height: 13px; }
/* catalog typeahead dropdown */
body > .ta-drop { position: fixed; z-index: 9999; background: #fff; backdrop-filter: none; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(24,36,96,.16); max-height: 260px; overflow-y: auto; left: auto; right: auto; top: auto; }
.ta-drop .ins-opt.active { background: rgba(48,120,192,.12); }
.ta-code-hint { font-size: 11px; font-weight: 650; color: var(--ink-3); font-family: var(--mono); margin-top: 4px; min-height: 13px; }
/* chip multi-input (family conditions) */
.chip-input { display: none; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.ci-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--navy); background: rgba(48,120,192,.10); padding: 3px 5px 3px 10px; border-radius: 999px; }
.ci-chip button { border: none; background: none; color: var(--ink-3); cursor: pointer; font-size: 11px; line-height: 1; padding: 2px; border-radius: 50%; }
.ci-chip button:hover { color: var(--danger-text); background: var(--danger-bg); }
/* assessment score chips on cognitive/psych cards */
.hist-scores { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); background: rgba(48,120,192,.03); }
.assess-chip { font-size: 10.5px; font-weight: 600; color: var(--ink-2); background: rgba(24,36,96,.06); padding: 2px 9px; border-radius: 999px; }
.assess-chip b { font-weight: 800; }
.assess-chip.sev-moderate, .assess-chip.sev-high { color: var(--warn-text); background: var(--warn-bg); }
.assess-chip.sev-severe, .assess-chip.sev-critical { color: var(--danger-text); background: var(--danger-bg); }
.assess-chip.sev-none, .assess-chip.sev-mild { color: var(--ok-text); background: var(--ok-bg); }
.card-assess { color: var(--purple, #7c4dff) !important; background: rgba(124,77,255,.10) !important; }
.card-assess:hover { background: rgba(124,77,255,.18) !important; }
/* history modals */
.hist-card { width: 96%; max-width: 500px; }
.hist-form { padding: 18px 20px; display: flex; flex-direction: column; gap: 15px; max-height: 68vh; overflow-y: auto; }
.hist-form input, .hist-form textarea, .hist-form select { width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.9); font-size: 13.5px; font-family: inherit; color: var(--ink); transition: border-color .14s var(--ease), box-shadow .14s var(--ease), background .14s var(--ease); }
.hist-form input::placeholder, .hist-form textarea::placeholder { color: var(--ink-3); }
.hist-form input:hover, .hist-form textarea:hover, .hist-form select:hover { border-color: rgba(48,120,192,.4); }
.hist-form input:focus, .hist-form textarea:focus, .hist-form select:focus { outline: none; border-color: var(--cyan); background: #fff; box-shadow: 0 0 0 3px rgba(48,120,192,.15); }
/* assessment picker */
.assess-pick { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; max-height: 66vh; overflow-y: auto; }
.assess-pick-item { text-align: left; background: var(--glass-strong); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 11px 14px; cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.assess-pick-item:hover { border-color: var(--cyan); background: rgba(48,120,192,.05); }
.assess-pick-item.ext { opacity: .7; }
.assess-pick-main { font-size: 14px; color: var(--navy); }
.assess-pick-full { font-size: 12px; color: var(--ink-2); font-weight: 400; }
.assess-ext-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--ink-3); background: rgba(24,36,96,.08); padding: 1px 6px; border-radius: 999px; margin-left: 6px; }
.assess-pick-sub { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.assess-pick-qm { font-size: 10.5px; color: var(--cyan-text); margin-top: 3px; }
/* assessment runner */
.assess-card { width: 96%; max-width: 560px; }
.assess-run { padding: 14px 18px; max-height: 62vh; overflow-y: auto; }
.assess-recall { font-size: 12.5px; font-style: italic; color: var(--ink-2); background: rgba(48,120,192,.05); border-radius: var(--r-md); padding: 9px 12px; margin-bottom: 14px; }
.assess-q { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.assess-qtext { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.assess-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.assess-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); background: rgba(24,36,96,.05); border: 1px solid transparent; padding: 6px 11px; border-radius: 999px; cursor: pointer; transition: all var(--dur-fast) var(--ease); }
.assess-opt:hover { background: rgba(48,120,192,.10); }
.assess-opt.sel { background: var(--cyan); color: #fff; }
.assess-optv { font-size: 9.5px; font-weight: 800; opacity: .6; }
.assess-opt.sel .assess-optv { opacity: .85; }
.assess-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.assess-live { font-size: 13px; color: var(--ink-2); }
.assess-live b { font-size: 18px; color: var(--navy); font-variant-numeric: tabular-nums; }
.assess-band { font-weight: 700; margin-left: 4px; }
.assess-band.sev-moderate, .assess-band.sev-high { color: var(--warn-text); }
.assess-band.sev-severe, .assess-band.sev-critical { color: var(--danger-text); }
.assess-band.sev-none, .assess-band.sev-mild { color: var(--ok-text); }

/* document toolbar */
.doctools { display: flex; flex-wrap: nowrap; gap: 4px; padding: 0; overflow-x: auto; scrollbar-width: thin; }
.doctool { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 9px; color: var(--ink); font-size: 11.5px; font-weight: 600; background: rgba(48,120,192,.06); border: 1px solid transparent; white-space: nowrap; flex-shrink: 0; transition: background .14s, color .14s, border-color .14s; }
.doctool:hover { background: rgba(48,120,192,.14); color: var(--navy); border-color: rgba(48,120,192,.28); }
.doctool svg { width: 15px; height: 15px; color: var(--cyan-text); }
.doctool:hover svg { color: var(--cyan-deep, var(--cyan-text)); }
.doctool-more { gap: 0; padding: 5px 9px; }

/* record timeline */
.rec { padding: 11px 16px; border-bottom: 1px solid var(--line-2); display: flex; gap: 12px; cursor: pointer; }
.rec:hover { background: rgba(255, 255, 255, .55); }
.rec .rdate { width: 56px; flex-shrink: 0; font-size: 11px; color: var(--ink-3); font-weight: 600; }
.rec .rt { font-weight: 600; font-size: 12.5px; }
.rec .rs { font-size: 11px; color: var(--ink-2); }
.req-action { border-left: 3px solid var(--warn); }

/* clinical reminders / co-pilot */
.reminder { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.reminder:last-child { border-bottom: none; }
.reminder .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.reminder .rtext { flex: 1; min-width: 0; }
.reminder .rtext .a { font-weight: 600; font-size: 12.5px; }
.reminder .rtext .b { font-size: 10.5px; color: var(--ink-3); }
.reminder .addr { font-size: 11px; font-weight: 700; color: var(--navy); }

/* ═══ Clinical Reminders — health maintenance + HEDIS/Star care gaps ═══ */
.rem-summary { display: flex; align-items: center; gap: 13px; padding: 12px 16px 13px; border-bottom: 1px solid var(--line-2); }
.rem-ring { --p: 0; position: relative; width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(#2c9c6a calc(var(--p) * 1%), rgba(24,36,96,.10) 0); display: grid; place-items: center; }
.rem-ring::after { content: ''; position: absolute; inset: 4px; background: var(--glass-strong, #fff); border-radius: 50%; }
.rem-ring span { position: relative; z-index: 1; font-size: 11px; font-weight: 800; color: var(--navy); }
.rem-sum-t { display: flex; flex-direction: column; line-height: 1.25; }
.rem-sum-t b { font-size: 15px; font-weight: 800; color: var(--navy); }
.rem-sum-t span { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.rem-list { display: flex; flex-direction: column; }
.rem-card { display: flex; align-items: flex-start; gap: 10px; padding: 10px 15px; border-bottom: 1px solid var(--line-2); position: relative; }
.rem-card:last-child { border-bottom: none; }
.rem-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.rem-card.rem-overdue::before { background: var(--danger-text, #c0392b); }
.rem-card.rem-due::before { background: #d97706; }
.rem-card.rem-assess::before { background: #2766a8; }
.rem-ic { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }
.rem-ic i, .rem-ic svg { width: 16px; height: 16px; }
.rem-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rem-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.rem-title { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.rem-code { font-size: 9px; font-weight: 800; letter-spacing: .4px; color: var(--ink-3); background: rgba(24,36,96,.07); padding: 1px 6px; border-radius: 5px; }
.rem-ev { font-size: 11px; color: var(--ink-2); line-height: 1.4; }
.rem-badge { flex: 0 0 auto; align-self: center; font-size: 8.5px; font-weight: 800; letter-spacing: .4px; padding: 3px 7px; border-radius: 999px; }
.rem-badge.rem-overdue { color: var(--danger-text, #c0392b); background: var(--danger-bg, rgba(229,72,77,.12)); }
.rem-badge.rem-due { color: #b45309; background: rgba(245,158,11,.16); }
.rem-badge.rem-assess { color: #2766a8; background: rgba(39,102,168,.12); }
.rem-badge.rem-met { color: #2c7a4b; background: rgba(44,122,75,.12); }
.rem-allclear { display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-size: 12.5px; font-weight: 600; color: #2c7a4b; }
.rem-allclear i, .rem-allclear svg { width: 16px; height: 16px; }
.rem-mettoggle { display: flex; align-items: center; gap: 6px; width: 100%; padding: 9px 16px; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--ink-2); background: rgba(44,122,75,.05); border: none; border-top: 1px solid var(--line-2); cursor: pointer; }
.rem-mettoggle:hover { background: rgba(44,122,75,.10); color: var(--navy); }
.rem-mettoggle i, .rem-mettoggle svg { width: 14px; height: 14px; }
.rem-met-list .rem-card { opacity: .82; }
.rem-met-list .rem-title { font-weight: 600; }
/* next-appointment bar */
.rem-apptbar { padding: 8px 15px; border-bottom: 1px solid var(--line-2); }
.rem-appt { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; }
.rem-appt.has { color: #2c7a4b; }
.rem-appt.none { color: var(--cyan-text); background: rgba(48,120,192,.08); border: 1px dashed rgba(48,120,192,.4); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.rem-appt.none:hover { background: rgba(48,120,192,.16); }
.rem-appt i, .rem-appt svg { width: 14px; height: 14px; }
/* collapsible category groups */
.rem-group { border-bottom: 1px solid var(--line-2); }
.rem-group.collapsed { border-bottom: 1px solid var(--line-2); }
.rem-ghead { display: flex; align-items: center; gap: 7px; width: 100%; padding: 9px 15px; background: none; border: none; cursor: pointer; font: inherit; text-align: left; }
.rem-ghead:hover { background: rgba(24,36,96,.03); }
.rem-gchev { width: 14px; height: 14px; color: var(--ink-3); flex-shrink: 0; }
.rem-gt { font-size: 12px; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.rem-gsub { font-size: 10px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .4px; }
.rem-gcount { margin-left: auto; font-size: 10px; font-weight: 800; color: var(--ink-3); background: rgba(24,36,96,.07); padding: 2px 8px; border-radius: 999px; }
.rem-gcount.has { color: #b45309; background: rgba(245,158,11,.16); }
.rem-group .rem-list { border-top: 1px solid var(--line-2); }
.rem-group .rem-card { padding-left: 15px; }
/* CPT reporting chip */
.rem-cpt { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: 9.5px; font-weight: 700; color: var(--ink-3); background: rgba(24,36,96,.05); border-radius: 5px; padding: 2px 6px; margin-top: 1px; letter-spacing: .2px; }
.rem-cpt i, .rem-cpt svg { width: 11px; height: 11px; }
/* action row */
.rem-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.rem-act { font: inherit; font-size: 11px; font-weight: 700; color: var(--ink-2); background: rgba(24,36,96,.05); border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px; cursor: pointer; transition: background .14s, color .14s, border-color .14s; }
.rem-act:hover { background: rgba(48,120,192,.12); color: var(--navy); border-color: var(--cyan); }
.rem-act.primary { color: var(--cyan-text); background: rgba(48,120,192,.12); border-color: transparent; }
.rem-act.primary:hover { background: rgba(48,120,192,.2); }
.rem-act i, .rem-act svg { vertical-align: -1px; }
.rem-completable { cursor: pointer; }
.rem-completable:hover { background: rgba(48,120,192,.04); }
/* completed (data on file, not yet reported) vs closed (reported/billed) */
.rem-card.rem-completed::before { background: #0e7490; }
.rem-badge.rem-completed { color: #0e7490; background: rgba(14,116,144,.12); }
.rem-badge.rem-closed { color: #2c7a4b; background: rgba(44,122,75,.14); }
.rem-met-list .rem-card.rem-closed { opacity: .9; }
/* report & close modal */
.rep-sub { font-size: 12px; color: var(--ink-2); line-height: 1.45; }
.rep-opts { display: flex; flex-direction: column; gap: 8px; }
.rep-opt { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; transition: border-color .14s, background .14s; }
.rep-opt:hover { border-color: var(--cyan); background: rgba(48,120,192,.04); }
.rep-opt:has(input:checked) { border-color: var(--cyan); background: rgba(48,120,192,.07); box-shadow: 0 0 0 2px rgba(48,120,192,.14); }
.rep-opt input, .rep-opt input[type=radio] { width: auto; flex: 0 0 auto; margin-top: 3px; }
.rep-opt-b { flex: 1; min-width: 0; }
.rep-opt-h { display: flex; align-items: center; gap: 8px; }
.rep-opt-code { font-size: 12px; font-weight: 800; color: var(--navy); background: rgba(24,36,96,.07); padding: 2px 8px; border-radius: 6px; }
.rep-closes { font-size: 9.5px; font-weight: 800; color: #2c7a4b; background: rgba(44,122,75,.12); padding: 2px 7px; border-radius: 999px; }
.rep-opt-l { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.rep-opt-d { font-size: 11px; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }
.rep-none { font-size: 12px; color: var(--ink-3); padding: 8px 0; }
/* BP report codes */
.bp-codes-h { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); margin-bottom: 7px; }
.bp-code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bp-code { display: flex; align-items: center; justify-content: space-between; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(48,120,192,.04); }
.bp-code-l { font-size: 10.5px; font-weight: 600; color: var(--ink-3); }
.bp-code b { font-size: 13px; font-weight: 800; color: var(--navy); }
.bp-verdict { margin-top: 10px; font-size: 12px; font-weight: 700; padding: 8px 11px; border-radius: 9px; }
.bp-verdict.ok { color: #2c7a4b; background: rgba(44,122,75,.1); }
.bp-verdict.bad { color: #b45309; background: rgba(245,158,11,.12); }
/* appointments modal */
.appt-sech { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); margin-bottom: 4px; }
.appt-book { margin-left: auto; padding: 4px 10px; font-size: 11.5px; }
.appt-row { display: flex; align-items: center; gap: 11px; padding: 9px 2px; border-bottom: 1px solid var(--line-2); }
.appt-row:last-of-type { border-bottom: none; }
.appt-when { flex: 0 0 auto; display: flex; flex-direction: column; min-width: 78px; }
.appt-when b { font-size: 12.5px; color: var(--navy); }
.appt-when span { font-size: 11px; color: var(--ink-3); }
.appt-mid { flex: 1; min-width: 0; }
.appt-t { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.appt-tele { font-size: 9px; font-weight: 800; color: #2563eb; background: rgba(37,99,235,.12); padding: 1px 6px; border-radius: 999px; vertical-align: 1px; }
.appt-r { font-size: 11px; color: var(--ink-2); }
.appt-st { flex: 0 0 auto; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; padding: 3px 8px; border-radius: 999px; color: var(--ink-3); background: rgba(24,36,96,.07); }
.appt-st.appt-scheduled, .appt-st.appt-confirmed { color: #2563eb; background: rgba(37,99,235,.12); }
.appt-st.appt-arrived, .appt-st.appt-seen { color: #2c7a4b; background: rgba(44,122,75,.12); }
.appt-st.appt-cancelled, .appt-st.appt-no_show { color: var(--danger-text); background: var(--danger-bg); }
/* outside care modal */
.oc-intro, .oc-foot { font-size: 12px; color: var(--ink-2); line-height: 1.45; }
.oc-foot { font-size: 11px; color: var(--ink-3); }
.oc-net { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
.oc-net-n { font-size: 13px; font-weight: 700; color: var(--navy); }
.oc-net-s { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.4; }
.oc-net-r { display: flex; align-items: center; gap: 8px; }
.oc-status { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; padding: 3px 8px; border-radius: 999px; }
.oc-status.oc-connected { color: #2c7a4b; background: rgba(44,122,75,.12); }
.oc-status.oc-disconnected { color: var(--ink-3); background: rgba(24,36,96,.07); }
.oc-connect { padding: 4px 12px; font-size: 11.5px; }
.oc-net-note { grid-column: 1 / -1; font-size: 11px; color: #b45309; background: rgba(245,158,11,.1); border-radius: 8px; padding: 6px 9px; }
.oc-rech { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); margin-top: 6px; }
.oc-empty { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--ink-3); background: rgba(24,36,96,.03); border: 1px dashed var(--line); border-radius: 11px; padding: 14px 15px; line-height: 1.45; }
.oc-empty i, .oc-empty svg { width: 20px; height: 20px; flex-shrink: 0; }
.rc-once { font-size: 12px; color: var(--ink-3); padding: 9px 0; }
.ht-preview { font-size: 13px; color: var(--ink-2); } .ht-preview b { color: var(--navy); }
.ht-bad { color: var(--danger-text); }
.ht-note { font-size: 11px; color: var(--ink-3); line-height: 1.45; background: rgba(48,120,192,.05); border-radius: 8px; padding: 8px 10px; }
.rc-filehint { font-size: 10.5px; color: var(--ink-3); margin-top: 3px; }

.lane { border-radius: 13px; overflow: hidden; margin: 0 14px 11px; border: 1px solid; }
.lane > .lh { display: flex; align-items: baseline; gap: 7px; padding: 8px 12px; border-bottom: 1px solid; }
.lane > .lh .ti { font-weight: 700; font-size: 12px; }
.lane > .lh .su { font-size: 9.5px; color: var(--ink-3); }
.lane > .lh .n { margin-left: auto; font-size: 10px; font-weight: 650; }
.lane .g { display: flex; align-items: center; gap: 8px; padding: 6px 11px; border-bottom: 1px solid rgba(0, 0, 0, .04); }
.lane .g:last-child { border-bottom: none; }
.wt { display: inline-block; min-width: 27px; text-align: center; font-weight: 650; font-size: 10px; color: #fff; border-radius: 7px; padding: 2px 0; }
.gmid { flex: 1; min-width: 0; }
.gmid .gt { font-weight: 600; font-size: 11.5px; }
.gmid .ge { font-size: 9.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st { font-size: 8px; font-weight: 650; }
.cpt { font-size: 9px; font-weight: 700; border-radius: 6px; padding: 1px 6px; }
.life { font-size: 8px; font-weight: 700; border-radius: 6px; padding: 0 5px; margin-left: 5px; }

/* misc */
.skel { height: 64px; margin: 12px 16px; border-radius: 13px; background: linear-gradient(90deg, rgba(255,255,255,.4) 25%, rgba(255,255,255,.75) 37%, rgba(255,255,255,.4) 63%); background-size: 400% 100%; animation: sh 1.3s infinite; }
@keyframes sh { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.notice { margin: 64px auto; max-width: 460px; background: var(--glass-strong); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: 20px; padding: 30px; text-align: center; box-shadow: var(--shadow-lg); }
.notice h2 { color: var(--navy); }
.notice a { color: var(--cyan-text); font-weight: 700; }
.placeholder { padding: 76px 24px; text-align: center; color: var(--ink-3); }
.placeholder h2 { font-size: 19px; color: var(--navy); margin-bottom: 6px; font-weight: 700; }
.statline { display: flex; gap: 24px; }
.statline .n { font-size: 27px; font-weight: 700; letter-spacing: -.02em; }
.statline .l { font-size: 10px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* ===== Calendar / Scheduler ===== */
.wl-section { min-width: 0; }
.wl-head { margin-bottom: 12px; }
.wl-title { font-size: 16px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; }

.cal-card { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.cal-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent); }
.cal-card.cal-expanded { position: fixed; inset: 70px 18px 18px; z-index: 60; max-height: none; box-shadow: var(--shadow-lg); }
.cal-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.12)); }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-size: 15px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; min-width: 180px; }
.cal-seg, .seg2 { display: inline-flex; background: rgba(24,36,96,.06); border-radius: 10px; padding: 3px; }
.cal-seg button, .seg2 button { border: none; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 6px 14px; border-radius: 8px; transition: all .12s; }
.cal-seg button.on, .seg2 button.on { background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.cal-prov { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.cal-prov svg { width: 15px; height: 15px; }
.cal-tools { margin-left: auto; display: flex; gap: 7px; }
.cal-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--navy); border: 1px solid var(--glass-border); background: rgba(255,255,255,.7); padding: 8px 12px; border-radius: 10px; transition: all .12s; }
.cal-btn svg { width: 15px; height: 15px; }
.cal-btn:hover { background: #fff; box-shadow: var(--shadow); transform: translateY(-1px); }
.cal-btn.primary { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(24,36,96,.28); }
.cal-btn.primary:hover { filter: saturate(1.1); box-shadow: 0 6px 20px rgba(24,36,96,.4); }
.cal-btn.danger { color: var(--danger); border-color: rgba(229,72,77,.3); background: rgba(229,72,77,.06); }

.cal-scroll { max-height: 560px; overflow-y: auto; }
.cal-expanded .cal-scroll { max-height: calc(100vh - 170px); }
.cal-grid { display: flex; }
.cal-gutter { width: 54px; flex-shrink: 0; padding-top: 0; }
.cal-grid.is-week .cal-gutter { padding-top: 34px; }
.cal-hourlbl { font-size: 10.5px; color: var(--ink-3); text-align: right; padding-right: 8px; transform: translateY(-7px); font-weight: 600; }
.cal-cols { display: flex; flex: 1; }
.cal-grid.is-day .cal-cols .cal-col { flex: 1; }
.cal-grid.is-week .cal-cols .cal-col { flex: 1; border-left: 1px solid var(--line-2); }
.cal-colhead { height: 34px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--line-2); }
.cal-colhead b { font-size: 14px; color: var(--navy); }
.cal-colhead.is-today { color: var(--cyan-text); } .cal-colhead.is-today b { color: var(--cyan-deep); }
.cal-colbody { position: relative; border-left: 1px solid var(--line-2); }
.cal-hour { position: relative; border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(24,36,96,.09) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(25% - 0.5px), rgba(24,36,96,.045) 25%, transparent calc(25% + 0.5px)),
    linear-gradient(to bottom, transparent calc(75% - 0.5px), rgba(24,36,96,.045) 75%, transparent calc(75% + 0.5px)); }
.cal-hour:hover { background-color: rgba(48,120,192,.04); cursor: pointer; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 5; }
.cal-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
/* ── Appointment card ────────────────────────────────────────────────────────────────────────
   The whole bubble carries the visit's colour, derived from one custom property (--c) that the
   calendar sets per appointment, so type, status and hover never fight over the same surface.

   Nothing here changes geometry on hover. The card used to lift by a pixel and short visits
   re-flowed to a column layout, which pulled the card out from under the cursor — hover dropped,
   the card snapped back, and it flickered. Hover is now paint only: a deeper fill, a ring, a
   shadow. */
.cal-appt {
  --c: var(--navy, #1B2B5B);
  --fill: color-mix(in oklab, var(--c) 12%, #fff);
  --fill-hi: color-mix(in oklab, var(--c) 20%, #fff);
  --edge: color-mix(in oklab, var(--c) 26%, #fff);
  --ink-c: color-mix(in oklab, var(--c) 72%, #0f1420);
  position: absolute; left: 5px; right: 5px; z-index: 3;
  border-radius: 10px; padding: 5px 9px 5px 11px; overflow: hidden; cursor: pointer;
  background: var(--fill);
  border: 1px solid var(--edge);
  box-shadow: inset 3px 0 0 var(--c);
  color: var(--ink-c);
  transition: background-color .12s ease, box-shadow .12s ease, border-color .12s ease;
  contain: paint;                       /* a card repaint never reaches the rest of the grid */
}
.cal-appt:hover {
  background: var(--fill-hi);
  border-color: color-mix(in oklab, var(--c) 46%, #fff);
  box-shadow: inset 3px 0 0 var(--c), 0 4px 14px -6px color-mix(in oklab, var(--c) 55%, transparent);
  z-index: 6;
}
.cal-appt:focus-visible {
  outline: none;
  box-shadow: inset 3px 0 0 var(--c), 0 0 0 2px #fff, 0 0 0 4px color-mix(in oklab, var(--c) 60%, #fff);
  z-index: 7;
}
.cal-appt .ca-row { display: flex; align-items: center; gap: 6px; }
.cal-appt .ca-name { font-weight: 680; font-size: 12px; letter-spacing: -.01em; color: var(--ink-c); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-appt .ca-badges { display: flex; align-items: center; gap: 4px; color: color-mix(in oklab, var(--c) 55%, #4a5568); }
.cal-tag { font-size: 8.5px; font-weight: 650; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.78); color: color-mix(in oklab, var(--c) 70%, #16203a); }
.cal-appt .ca-sub { font-size: 10.5px; color: color-mix(in oklab, var(--c) 48%, #566074); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-appt .ca-time { font-size: 10px; color: var(--ink-3); margin-top: 1px; }
/* Status rides on top of the visit's own colour instead of replacing it: arrived and seen are
   states of THIS visit, not a different kind of visit. */
.cal-appt.st-arrived { --fill: color-mix(in oklab, var(--c) 20%, #fff); box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1px var(--warn, #d97706); }
.cal-appt.st-arrived:hover { box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1px var(--warn, #d97706), 0 4px 14px -6px color-mix(in oklab, var(--c) 55%, transparent); }
.cal-appt.st-seen { --fill: color-mix(in oklab, var(--c) 8%, #fff); opacity: .86; }
.cal-appt.st-seen .ca-name { font-weight: 600; }
.cal-appt.st-cancelled, .cal-appt.st-no_show { --c: #8b93a6; opacity: .55; }
.cal-appt.st-cancelled .ca-name { text-decoration: line-through; }

/* ===== Appointment modal ===== */
/* Non-blocking, movable popups (Elation-style): overlay is click-through so the
   EMR behind stays usable; the card itself is interactive and draggable by its head. */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: transparent; display: flex; align-items: flex-start; justify-content: center; padding: 56px 16px; pointer-events: none; animation: fade .15s ease; }
.modal-card { width: 100%; max-width: 720px; background: var(--glass-strong); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: 20px; box-shadow: 0 24px 70px -12px rgba(15,25,55,.45), 0 6px 18px rgba(15,25,55,.22); overflow: hidden; pointer-events: auto; }
.modal-card.dragging { box-shadow: 0 34px 96px -10px rgba(15,25,55,.55); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-2); cursor: move; user-select: none; }
.modal-head .modal-x { cursor: pointer; }
.modal-head h2 { font-size: 18px; font-weight: 700; color: var(--navy); }
.modal-x { border: none; background: rgba(24,36,96,.06); width: 30px; height: 30px; border-radius: 9px; color: var(--ink-2); font-size: 13px; }
.modal-x:hover { background: rgba(24,36,96,.12); color: var(--navy); }
.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.fld > span { font-size: 11px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .3px; }
.fld input, .fld select, .fld textarea { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; font-size: 13.5px; background: rgba(255,255,255,.8); color: var(--ink); outline: none; transition: border .12s, box-shadow .12s; width: 100%; }
/* a quiet note that sits in the grid where a field would, so a row keeps its rhythm */
.fld-note { font-size: 11.5px; line-height: 1.45; color: var(--ink-2); padding: 10px 0 0; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(48,120,192,.18); }
.fld-row { display: flex; gap: 12px; }
@media (max-width: 620px) { .fld-row { flex-direction: column; } }
.pta { position: relative; }
.pta-results { position: absolute; top: 44px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 10; max-height: 260px; overflow-y: auto; display: none; }
.pta-results.show { display: block; }
.pta-row { padding: 9px 13px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.pta-row:hover { background: var(--surface-2, #f7f9fc); }
.pta-row b { display: block; font-size: 13px; color: var(--ink); }
.pta-row span { font-size: 11px; color: var(--ink-3); }
.pta-empty { padding: 12px 13px; color: var(--ink-3); font-size: 12px; }
.seg2 button { padding: 9px 14px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-top: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.4)); }

/* ===== Booking modal — smart slot finder ===== */
.jump-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jump-chip { font-size: 11.5px; font-weight: 600; color: var(--navy); background: rgba(24,36,96,.06); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; transition: all .12s; }
.jump-chip:hover { background: rgba(48,120,192,.14); border-color: var(--cyan); color: var(--cyan-text); }
.slot-head { display: flex; align-items: baseline; gap: 8px; }
.slot-head .sd { font-size: 12px; color: var(--ink-2); }
.slot-head .sd b { color: var(--navy); }
.slot-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 132px; overflow-y: auto; padding: 2px; }
.slot { font-size: 11.5px; font-weight: 600; color: var(--ink); background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; transition: all .12s; }
.slot:hover { border-color: var(--cyan); background: rgba(48,120,192,.12); transform: translateY(-1px); }
.slot.sel { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(24,36,96,.28); }
.slot-none { font-size: 12px; color: var(--ink-3); padding: 8px 2px; }
.slot-busy { font-size: 11px; color: var(--ink-3); margin-top: 4px; }

/* ===== Practice Home: calendar + work queue (master-detail) ===== */
.ph-grid { display: grid; grid-template-columns: minmax(360px, 420px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 1180px) { .ph-grid { grid-template-columns: 1fr; } }
.queue { display: grid; grid-template-columns: 184px 1fr; gap: 14px; align-items: start; min-width: 0; }
@media (max-width: 720px) { .queue { grid-template-columns: 1fr; } }
.q-rail { background: var(--glass); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; padding: 6px; position: relative; }
.q-rail::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent); }
.q-rail-head { font-size: 10.5px; font-weight: 650; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-3); padding: 9px 10px 6px; }
.q-cat { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: none; background: transparent; border-radius: 11px; transition: all .12s; position: relative; }
.q-cat .q-cat-l { flex: 1; text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.q-cat .q-cat-n { font-size: 11px; font-weight: 650; min-width: 22px; text-align: center; padding: 2px 7px; border-radius: 999px; background: rgba(24,36,96,.06); color: var(--ink-3); }
.q-cat .q-cat-n.has { background: rgba(48,120,192,.18); color: var(--cyan-text); }
.q-cat:hover { background: rgba(255,255,255,.7); }
.q-cat:hover .q-cat-l { color: var(--navy); }
.q-cat.dim { opacity: .55; }
.q-cat.active { background: var(--brand-grad); box-shadow: 0 4px 14px rgba(24,36,96,.26); opacity: 1; }
.q-cat.active .q-cat-l { color: #fff; }
.q-cat.active .q-cat-n { background: rgba(255,255,255,.24); color: #fff; }

.q-detail { background: var(--glass); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; min-height: 320px; position: relative; }
.q-detail::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent); }
.q-detail-head { padding: 14px 18px; font-size: 14px; font-weight: 700; color: var(--navy); border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; }
.q-detail-head span { font-size: 11px; font-weight: 650; color: var(--cyan-text); background: rgba(48,120,192,.16); padding: 2px 9px; border-radius: 999px; }
.q-item { display: flex; align-items: center; gap: 13px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background .1s; }
.q-item:last-child { border-bottom: none; }
.q-item:hover { background: rgba(255,255,255,.6); }
.q-item-main { flex: 1; min-width: 0; }
.q-item-t { font-weight: 700; font-size: 14px; letter-spacing: -.01em; }
.q-item-s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.q-gap { font-size: 11px; font-weight: 650; color: var(--warn); background: rgba(217,119,6,.12); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.q-open { font-size: 11.5px; font-weight: 700; color: var(--cyan-text); white-space: nowrap; }
.q-empty { padding: 64px 24px; text-align: center; }
.q-empty-i { font-size: 30px; opacity: .4; }
.q-empty-t { font-weight: 700; color: var(--ink-2); margin-top: 8px; font-size: 14px; }
.q-empty-s { font-size: 12px; color: var(--ink-3); margin-top: 4px; max-width: 380px; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* ===== Top bar: notifications + user menu ===== */
.notifwrap, .usermenu { position: relative; }
.usermenu-btn { display: flex; align-items: center; gap: 8px; border: none; background: transparent; padding: 5px 8px; border-radius: 11px; transition: background .12s; }
.usermenu-btn:hover { background: rgba(255,255,255,.7); }
.uavatar { width: 28px; height: 28px; border-radius: 9px; background: var(--navy-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; }
.usermenu-btn .who { color: var(--navy); }
.usermenu-btn svg { color: var(--ink-3); }
.pop { position: absolute; top: 46px; right: 0; min-width: 230px; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 60; padding: 6px; }
.pop.hidden { display: none; }
.pop-head { font-size: 10.5px; font-weight: 650; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-3); padding: 8px 10px 4px; }
.pop-empty { padding: 16px 10px; color: var(--ink-3); font-size: 12.5px; text-align: center; }
.um-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: none; background: transparent; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--ink); text-align: left; }
.um-item svg { width: 16px; height: 16px; color: var(--ink-2); }
.um-item:hover { background: rgba(24,36,96,.06); }
.um-item.danger { color: var(--danger); } .um-item.danger svg { color: var(--danger); }
.um-sep { height: 1px; background: var(--line-2); margin: 5px 8px; }
.notif-pop { min-width: 300px; }
.notif-item { width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 10px 11px; border: none; background: transparent; border-radius: 10px; text-align: left; }
.notif-item:hover { background: rgba(48,120,192,.10); }
.notif-item .ni { font-size: 16px; }
.notif-item .nt { font-size: 13px; font-weight: 700; color: var(--ink); }
.notif-item .ns { font-size: 11px; color: var(--ink-3); }

/* ===== Care Reminders — dashboard-style quality rings ===== */
.cr-rings { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.cr-ring { background: rgba(255,255,255,.55); border: 1px solid var(--glass-border); border-radius: 14px; padding: 10px 8px 8px; width: 88px; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: all .14s; }
.cr-ring:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cr-ring.sel { background: var(--brand-grad); border-color: transparent; box-shadow: 0 6px 18px rgba(24,36,96,.28); }
.cr-ring.sel .cr-ring-pct, .cr-ring.sel .cr-ring-code, .cr-ring.sel .cr-ring-n { color: #fff; }
.cr-ring.sel .cr-ring-wrap circle:first-child { stroke: rgba(255,255,255,.25); }
.cr-ring-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.cr-ring-pct { position: absolute; font-size: 14px; font-weight: 650; letter-spacing: -.5px; color: var(--navy); }
.cr-ring-code { font-size: 11.5px; font-weight: 650; color: var(--navy); }
.cr-ring-n { font-size: 9.5px; font-weight: 600; color: var(--ink-3); }
.cr-back { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--cyan-text); border: 1px solid rgba(48,120,192,.3); background: rgba(48,120,192,.1); border-radius: 9px; padding: 4px 10px; }
.cr-list { min-height: 80px; }

/* ===== Open patient chart tabs (Elation-style multi-chart) ===== */
.charttabs { position: sticky; top: 58px; z-index: 45; height: 42px; display: flex; align-items: center; gap: 6px; padding: 0 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line); overflow-x: auto; }
.charttabs.hidden { display: none; }
.ct-home { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--glass-border); background: rgba(255,255,255,.7); color: var(--navy); display: flex; align-items: center; justify-content: center; }
.ct-home svg { width: 16px; height: 16px; }
.ct-home:hover { background: #fff; box-shadow: var(--shadow); }
.ct-tab { flex-shrink: 0; display: flex; align-items: center; gap: 8px; max-width: 220px; padding: 5px 8px 5px 6px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2); transition: all .12s; }
.ct-tab:hover { background: rgba(255,255,255,.7); }
.ct-tab.active { background: #fff; border-color: var(--glass-border); box-shadow: var(--shadow); color: var(--navy); }
.ct-tab.active .ct-av { background: var(--navy-grad); }
.ct-av { width: 24px; height: 24px; border-radius: 7px; background: var(--ink-3); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 650; flex-shrink: 0; }
.ct-nm { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-x { font-size: 11px; color: var(--ink-3); width: 18px; height: 18px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ct-x:hover { background: rgba(229,72,77,.14); color: var(--danger); }

/* ===== Orders queue ===== */
.ord-new { margin-left: auto; font-size: 12px; font-weight: 700; color: #fff; background: var(--brand-grad); border: none; border-radius: 9px; padding: 6px 12px; box-shadow: 0 3px 10px rgba(24,36,96,.28); }
.ord-new:hover { filter: saturate(1.1); }
.ord-sec { font-size: 10.5px; font-weight: 650; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-3); padding: 12px 18px 6px; }
.ord-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line-2); }
.ord-item:hover { background: rgba(255,255,255,.6); }
.ord-ic { width: 36px; height: 36px; border-radius: 10px; background: rgba(48,120,192,.12); color: var(--cyan-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ord-ic svg { width: 18px; height: 18px; }
.ord-main { flex: 1; min-width: 0; }
.ord-t { font-weight: 700; font-size: 13.5px; }
.ord-s { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.ord-st { font-size: 9.5px; font-weight: 650; white-space: nowrap; }
.ord-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ord-btn { font-size: 11px; font-weight: 700; color: var(--navy); border: 1px solid var(--line); background: rgba(255,255,255,.7); border-radius: 8px; padding: 5px 10px; }
.ord-btn:hover { background: #fff; box-shadow: var(--shadow); }
.ord-btn.on { color: var(--warn); border-color: rgba(217,119,6,.3); background: rgba(217,119,6,.08); }
.ord-btn.ok { color: var(--ok); border-color: rgba(22,163,74,.3); background: rgba(22,163,74,.08); }

/* ===== Modal section header (new-chart form) ===== */
.form-sec { font-size: 13px; font-weight: 650; color: var(--navy); letter-spacing: -.01em; padding: 6px 0 2px; border-bottom: 1px solid var(--line-2); margin-bottom: 2px; }
.form-sec:not(:first-child) { margin-top: 8px; }

/* ===== Orders sub-tabs + next-appt + sign-off + toast ===== */
.ot-tabs { display: flex; gap: 7px; padding: 12px 16px 4px; }
.ot-tab { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: rgba(24,36,96,.05); border: 1px solid transparent; border-radius: 999px; padding: 6px 13px; display: flex; align-items: center; gap: 7px; transition: all .12s; }
.ot-tab:hover { color: var(--navy); }
.ot-tab.active { background: var(--brand-grad); color: #fff; box-shadow: 0 4px 12px rgba(24,36,96,.26); }
.ot-tab .ot-n { font-size: 10.5px; font-weight: 650; padding: 0 6px; border-radius: 999px; background: rgba(255,255,255,.28); }
.ot-tab:not(.active) .ot-n { background: rgba(48,120,192,.18); color: var(--cyan-text); }
.ord-appt.has { color: var(--cyan-text); font-weight: 600; }
.ord-appt.none { color: var(--warn); font-weight: 600; }
.ord-signed { font-size: 11px; font-weight: 650; color: var(--ok); white-space: nowrap; }
.emr-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; font-size: 13px; font-weight: 600; padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .25s cubic-bezier(.16,1,.3,1); z-index: 200; }
.emr-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Referral close-the-loop tracker ===== */
.rl-item { align-items: flex-start; }
.rl-track { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rl-step { display: flex; align-items: center; gap: 8px; padding: 6px 11px 6px 8px; border-radius: 999px; background: rgba(24,36,96,.05); border: 1px solid var(--line-2); }
.rl-step.done { background: rgba(22,163,74,.10); border-color: rgba(22,163,74,.25); }
.rl-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--ink-3); color: #fff; font-size: 10px; font-weight: 650; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rl-step.done .rl-dot { background: var(--ok); }
.rl-lab { font-size: 11.5px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.rl-sub { font-size: 10px; font-weight: 500; color: var(--ink-3); }
.rl-act { font-size: 10.5px; font-weight: 700; color: var(--cyan-text); border: 1px solid rgba(48,120,192,.3); background: rgba(48,120,192,.08); border-radius: 7px; padding: 3px 8px; }
.rl-act:hover { background: rgba(48,120,192,.16); }

/* ===== Create New Patient Chart — sectioned modal ===== */
.nc-card { max-width: 880px; width: 96%; max-height: 88vh; display: flex; flex-direction: column; }
.nc-layout { display: flex; flex: 1; min-height: 0; }
.nc-nav { width: 184px; flex-shrink: 0; border-right: 1px solid var(--line-2); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nc-navi { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: none; border: none; padding: 9px 11px; border-radius: 9px; transition: all .12s; }
.nc-navi:hover { background: rgba(255,255,255,.7); color: var(--navy); }
.nc-navi.active { background: rgba(48,120,192,.12); color: var(--navy); font-weight: 700; }
.nc-form { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nc-form section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 8px; }
.nc-hint { font-size: 11.5px; color: var(--ink-3); }
@media (max-width: 640px) { .nc-nav { display: none; } }

/* Clickable patient name → opens the editable patient-info modal (Elation-style) */
.clickable-name { cursor: pointer; transition: color .12s; }
.clickable-name:hover { color: var(--cyan-deep, #2a6cb0); text-decoration: underline; text-underline-offset: 3px; }

/* ===== Structured insurance editor (payer directory, primary/secondary/tertiary) ===== */
.lnk-btn { background: none; border: none; color: var(--cyan-text); font-weight: 700; font-size: 12.5px; padding: 2px 4px; border-radius: 7px; }
.lnk-btn:hover { background: rgba(48,120,192,.10); }
.ins-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; margin-bottom: 12px; background: rgba(255,255,255,.55); display: flex; flex-direction: column; gap: 11px; }
.ins-card-head { display: flex; align-items: center; justify-content: space-between; }
.ins-rank { font-size: 11px; font-weight: 650; letter-spacing: .4px; text-transform: uppercase; color: var(--navy); background: rgba(24,36,96,.08); padding: 3px 10px; border-radius: 999px; }
.ins-del { background: none; border: none; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.ins-del:hover { color: var(--danger); }
.ins-carrier { position: relative; }
.ins-carrier-in { width: 100%; }
.ins-carrier-meta { font-size: 11px; color: var(--ink-2); margin-top: 4px; min-height: 14px; }
.ins-elig-ok { color: var(--ok); font-weight: 700; }
.ins-carrier-drop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--glass-strong); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 280px; overflow-y: auto; }
.ins-opt { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.ins-opt:last-child { border-bottom: none; }
.ins-opt:hover { background: rgba(48,120,192,.10); }
.ins-opt-text { flex: 1; min-width: 0; }
.ins-opt-main { font-size: 13px; color: var(--ink); }
.ins-opt-sub { font-size: 11px; color: var(--ink-2); margin-top: 1px; }
.ins-unv { font-size: 9.5px; font-weight: 700; color: var(--warn); background: rgba(217,119,6,.12); padding: 1px 6px; border-radius: 999px; }
.ins-fav { background: none; border: none; color: var(--ink-3); font-size: 16px; line-height: 1; padding: 0 2px; }
.ins-fav.on { color: var(--gold); }
.ins-create { color: var(--cyan-text); font-weight: 700; font-size: 12.5px; }
.ins-row-actions { display: flex; align-items: center; gap: 6px; }
.ins-spacer { flex: 1; }
.ins-line { margin-bottom: 8px; }

/* ===== Provider directory typeahead ===== */
.prov-ta { position: relative; }
.ta-drop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--glass-strong); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 300px; overflow-y: auto; }
.ta-meta { font-size: 11px; color: var(--ink-2); margin-top: 4px; min-height: 14px; }

/* ===== Address auto-fill + repeater blocks (previous names/addresses) ===== */
.addr-ta { position: relative; }
.addr-hint { font-weight: 500; color: var(--ink-3); font-size: 10.5px; }
.rep-block { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.rep-head { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 8px; }
.rep-head .lnk-btn { margin-left: auto; text-transform: none; letter-spacing: 0; }
.rep-row { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 8px; }
.rep-del { flex-shrink: 0; width: 30px; height: 34px; border: 1px solid var(--line); background: rgba(255,255,255,.5); border-radius: 9px; color: var(--ink-3); font-size: 13px; }
.rep-del:hover { color: var(--danger); border-color: var(--danger); }
.chkfld { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); flex: 1; }

/* ===== Settings directory manager ===== */
.set-wrap { padding: 26px; max-width: 1100px; margin: 0 auto; }
.set-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -.03em; color: var(--navy); }
.set-head .sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.set-tabs { display: flex; gap: 4px; margin: 18px 0 16px; border-bottom: 1px solid var(--line); }
.set-tab { background: none; border: none; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 10px 16px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.set-tab:hover { color: var(--navy); }
.set-tab.active { color: var(--navy); border-bottom-color: var(--cyan); }
.set-toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.set-search { flex: 1; padding: 10px 14px; border: 1px solid var(--glass-border); border-radius: 11px; background: rgba(255,255,255,.7); font-size: 13.5px; }
.set-table-wrap { background: var(--glass); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.set-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.set-table thead th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); padding: 11px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.4); }
.set-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.set-table tbody tr:last-child td { border-bottom: none; }
.set-table tbody tr:hover { background: rgba(255,255,255,.5); }
.set-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.set-actions { text-align: right; white-space: nowrap; }
.lnk-btn.danger { color: var(--danger); }
.lnk-btn.danger:hover { background: rgba(229,72,77,.10); }

/* pharmacy typeahead reuses provider/insurance dropdown styles */
.rx-ta { position: relative; }

/* ===== Visit notes ===== */
.vn-card { max-width: 760px; width: 96%; max-height: 90vh; display: flex; flex-direction: column; }
.vn-body { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; }
.vn-body textarea { resize: vertical; font-family: var(--font); font-size: 13px; line-height: 1.5; padding: 9px 11px; border: 1px solid var(--glass-border); border-radius: 10px; background: rgba(255,255,255,.7); }
.vn-draft { font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; color: var(--warn); background: rgba(217,119,6,.13); padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.vn-signed { font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; color: var(--ok); background: rgba(22,163,74,.13); padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.vn-addenda { white-space: pre-wrap; font-size: 12.5px; color: var(--ink-2); background: rgba(24,36,96,.04); border-left: 3px solid var(--cyan); padding: 9px 12px; border-radius: 0 8px 8px 0; }
.vn-listhead { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; color: var(--cyan-text); padding: 8px 16px 4px; }
.vn-rec { cursor: pointer; }
.vn-rec:hover { background: rgba(48,120,192,.08); }

/* ===== e-Prescribing (DoseSpot) iframe ===== */
.erx-card { width: 96%; max-width: 1120px; height: 86vh; display: flex; flex-direction: column; }
.erx-frame { flex: 1; width: 100%; border: 0; border-radius: 0 0 20px 20px; background: #fff; }
.erx-steps { margin: 0 0 12px 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink); line-height: 1.5; }
.erx-steps code { background: rgba(24,36,96,.07); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* ===== Problem List (chronic/acute + smart) ===== */
/* ===== Problem List toolbars — Apple-grade segmented controls ===== */
.pl-card { container-type: inline-size; }
.pl-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; row-gap: 6px; flex-wrap: wrap; padding: 7px 12px 5px; border-bottom: 1px solid var(--line-2); }
.pl-bar-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
/* Narrow column: collapse the action labels to icons so the toolbar stays on one line */
@container (max-width: 430px) {
  .pl-bar { gap: 6px; }
  .pl-bar-actions { gap: 4px; }
  .pl-bar-actions .pl-lbl { display: none; }
  .pl-bar-actions .pl-add { padding: 4px 6px; }
  .pl-bar .seg-btn { padding: 3px 9px; }
  .pl-bar .seg-sm .seg-btn { padding: 3px 8px; }
}
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 2px; background: rgba(24,36,96,.06); border-radius: 9px; }
.seg-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 3px 11px; border-radius: 7px; cursor: pointer; white-space: nowrap; transition: color .15s, background .15s, box-shadow .15s; }
.seg-btn:hover { color: var(--navy); }
.seg-btn.active { background: #fff; color: var(--navy); font-weight: 700; box-shadow: 0 1px 2px rgba(24,36,96,.14), 0 1px 1px rgba(24,36,96,.06); }
.seg-sm .seg-btn { font-size: 11.5px; padding: 3px 10px; }
.seg-spark { color: var(--gold); font-size: 11px; }
.pl-tabn { background: rgba(48,120,192,.16); color: var(--cyan-text); font-size: 10px; font-weight: 650; padding: 0 6px; border-radius: 999px; }
.seg-btn.active .pl-tabn { background: rgba(48,120,192,.20); }
.pl-add { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; color: #fff; background: var(--cyan); border: 1px solid transparent; padding: 4px 11px; border-radius: 8px; cursor: pointer; white-space: nowrap; flex-shrink: 0; box-shadow: 0 1px 2px rgba(48,120,192,.30); transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.pl-add:hover { background: var(--cyan-deep); }
.pl-add:active { transform: scale(.97); }
.pl-blockact { display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); background: rgba(24,36,96,.05); border: 1px solid var(--line); padding: 4px 7px; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.pl-blockact:hover { background: rgba(48,120,192,.10); color: var(--navy); border-color: var(--cyan); }
.pl-sec { padding: 6px 0 2px; }
.pl-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 14px 5px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); background: none; border: none; }
.pl-sec-tog { cursor: pointer; } .pl-sec-tog:hover { color: var(--navy); }
.pl-sec-n { color: var(--ink-3); font-weight: 700; }
.pl-fam { margin-bottom: 2px; }
.pl-fam-h { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; background: rgba(24,36,96,.035); border: none; padding: 7px 14px; font-size: 12px; font-weight: 700; color: var(--navy); }
.pl-fam-h:hover { background: rgba(24,36,96,.06); }
.pl-fam-h i { width: 14px; height: 14px; }
.pl-fam-n { color: var(--ink-3); font-weight: 700; font-size: 11px; }
.pl-item { border-bottom: 1px solid var(--line-2); }
.pl-row { display: flex; align-items: flex-start; gap: 4px; padding: 9px 12px 9px 8px; }
.pl-row:hover { background: rgba(255,255,255,.5); }
.pl-exp { background: none; border: none; color: var(--ink-3); padding: 2px; margin-top: 1px; } .pl-exp i { width: 15px; height: 15px; }
.pl-main { flex: 1; min-width: 0; }
.pl-t { font-weight: 600; font-size: 13px; color: var(--ink); }
.pl-s { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 3px; }
.pl-status { font-size: 10px; font-weight: 700; color: var(--warn); text-transform: capitalize; }
.pl-haveap { font-size: 9.5px; font-weight: 650; color: var(--cyan-text); background: rgba(48,120,192,.12); padding: 1px 6px; border-radius: 999px; }
.pl-acts { display: flex; gap: 1px; opacity: .55; transition: opacity .12s; }
.pl-row:hover .pl-acts { opacity: 1; }
.pl-ic { background: none; border: none; color: var(--ink-2); padding: 4px; border-radius: 7px; } .pl-ic i { width: 15px; height: 15px; }
.pl-ic:hover { background: rgba(48,120,192,.12); color: var(--navy); }
.pl-ap { padding: 0 12px 12px 30px; }
.pl-ap-tools { margin-bottom: 6px; }
.pl-ap-txt { width: 100%; resize: vertical; font-family: var(--font); font-size: 12.5px; line-height: 1.5; padding: 9px 11px; border: 1px solid var(--glass-border); border-radius: 10px; background: rgba(255,255,255,.7); }
.pl-ap-save { margin-top: 7px; display: flex; justify-content: flex-end; }
/* smart tab */
.pl-smart-head { font-size: 12px; color: var(--ink-2); padding: 12px 14px; line-height: 1.5; background: rgba(48,120,192,.06); border-bottom: 1px solid var(--line-2); }
.pl-smart-cat { color: var(--navy); } .pl-smart-cat.green { color: var(--ok); } .pl-smart-cat.blue { color: var(--cyan-text); }
.pl-smart-cat span { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-3); margin-left: 4px; }
.pl-sug { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); border-left: 3px solid var(--line); }
.pl-sug.green { border-left-color: var(--ok); } .pl-sug.blue { border-left-color: var(--cyan); }
.pl-sug-main { flex: 1; min-width: 0; font-size: 12.5px; }
.pl-sug-r { font-size: 12px; color: var(--ink); margin-top: 3px; line-height: 1.5; }
.pl-sug-e { font-size: 11px; color: var(--ink-3); font-style: italic; margin-top: 3px; }
.pl-sug-j { font-size: 11px; color: var(--warn); margin-top: 2px; }
.pl-sug-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.pl-rel { font-size: 9px; font-weight: 650; color: #fff; background: var(--ink-3); padding: 2px 8px; border-radius: 999px; }
.pl-conf { font-size: 11px; padding: 5px 10px; white-space: nowrap; }
.pl-ic.danger:hover { background: rgba(229,72,77,.12); color: var(--danger); }

/* ===== Dx Code Navigator (faceted problem search) ===== */
.dx-card { width: 96%; max-width: 760px; max-height: 90vh; display: flex; flex-direction: column; }
.dx-body { padding: 16px 18px 6px; display: flex; flex-direction: column; gap: 11px; min-height: 0; flex: 1; overflow: hidden; }
/* Search results take the flexible space (and scroll); the companion + "code also"
   boxes stay pinned below and get their own scroll so they're never clipped. */
.dx-body > .dxs-panel { flex: 1 1 auto; min-height: 120px; }
.dx-companion { flex: 0 0 auto; max-height: 30vh; overflow-y: auto; }
.dx-search { width: 100%; padding: 11px 14px; border: 1px solid var(--glass-border); border-radius: 11px; background: rgba(255,255,255,.75); font-size: 14px; }
.dx-facets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 0 0 auto; row-gap: 6px; }
.dx-facet-lbl { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); margin-right: 2px; }
.dx-chip { font-size: 12px; font-weight: 600; color: var(--ink-2); background: rgba(24,36,96,.06); border: 1px solid transparent; padding: 4px 11px; border-radius: 999px; }
.dx-chip:hover { background: rgba(48,120,192,.12); color: var(--navy); }
.dx-chip.on { background: rgba(48,120,192,.16); color: var(--cyan-text); border-color: var(--cyan); font-weight: 700; }
.dx-results { flex: 1 1 auto; min-height: 120px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 12px; background: var(--glass-strong); }
.dx-res { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--line-2); padding: 9px 12px; }
.dx-res:last-child { border-bottom: none; }
.dx-res:hover { background: rgba(48,120,192,.08); }
.dx-res.sel { background: rgba(48,120,192,.14); }
.dx-res.active { background: rgba(48,120,192,.20); box-shadow: inset 3px 0 0 var(--cyan-text, #2563eb); }
/* Persistent selection — stays highlighted after click until another is picked */
.dx-res.selected { background: rgba(48,120,192,.16); box-shadow: inset 3px 0 0 var(--cyan-text, #2563eb); }
.dx-res.selected .dx-res-code { color: var(--cyan-text, #2563eb); }
.dx-unspec { display: inline-block; margin-left: 8px; font-size: 10px; font-weight: 650; color: #92600a; background: rgba(245,158,11,.16); padding: 1px 7px; border-radius: 999px; vertical-align: middle; }
.dx-comp-grp + .dx-comp-grp { margin-top: 6px; border-top: 1px solid var(--line-2); }
.dx-res-code { font-weight: 650; color: var(--navy); font-size: 12.5px; min-width: 66px; flex-shrink: 0; }
.dx-res-desc { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink); }
.dx-nohcc { font-size: 10px; color: var(--ink-3); }
.dx-foot { display: flex; align-items: center; gap: 12px; }
.dx-sel { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-foot select, .dx-foot input { padding: 7px 9px; border: 1px solid var(--glass-border); border-radius: 9px; background: rgba(255,255,255,.7); font-size: 12.5px; }

/* ===== Shared diagnosis search engine (renderDxSearch) — Add + Edit modals ===== */
.dxs { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.dxs-bar { display: flex; gap: 8px; align-items: center; }
.dxs-input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--glass-border); border-radius: 11px; background: rgba(255,255,255,.75); font-size: 14px; }
.dxs-rank { display: inline-flex; flex-shrink: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: rgba(24,36,96,.04); }
.dxs-rank-btn { font: inherit; font-size: 11px; font-weight: 650; letter-spacing: .2px; color: var(--ink-3); background: none; border: none; padding: 7px 12px; cursor: pointer; transition: background .15s, color .15s; }
.dxs-rank-btn:hover { color: var(--navy); }
.dxs-rank-btn.on { background: var(--cyan, #3078c0); color: #fff; }
.dxs-facets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; row-gap: 6px; }
.dxs-facets:empty { display: none; }
.dxs-empty { padding: 18px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
/* Panel variant (Add-problem Dx Navigator): results fill remaining height */
.dxs-panel { flex: 1; }
.dxs-panel .dxs-results { flex: 1 1 auto; min-height: 120px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 12px; background: var(--glass-strong); }
/* Dropdown variant (Edit-problem inline add): compact capped list */
.ep-search .dxs-results { max-height: 300px; overflow-y: auto; }
.ep-search .dxs-results:not(:empty) { border: 1px solid var(--line-2); border-radius: 10px; background: var(--glass-strong); margin-top: 2px; }
/* Specificity ladder + recents/favorites */
.dx-cat { background: rgba(24,36,96,.03); }
.dx-cat .dx-res-code { color: var(--cyan-text, #2563eb); }
.dx-cat-n { font-size: 11px; font-weight: 700; color: var(--cyan-text, #2563eb); white-space: nowrap; }
.dx-cat-raf { font-size: 10px; font-weight: 650; color: #92600a; background: rgba(245,158,11,.14); padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.dx-specify { display: inline-block; margin-left: 8px; font-size: 10.5px; font-weight: 650; color: var(--cyan-text, #2563eb); background: rgba(48,120,192,.12); padding: 1px 8px; border-radius: 999px; cursor: pointer; }
.dx-specify:hover { background: rgba(48,120,192,.24); }
.dx-star { margin-left: 8px; font-size: 14px; color: var(--line); cursor: pointer; flex-shrink: 0; transition: color .12s, transform .12s; }
.dx-star:hover { transform: scale(1.2); color: #f5b301; }
.dx-star.on { color: #f5b301; }
.dxs-crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px 4px 8px; position: sticky; top: 0; background: var(--glass-strong); z-index: 1; }
.dxs-crumb { font: inherit; font-size: 11.5px; font-weight: 650; color: var(--ink-2); background: none; border: none; padding: 2px 6px; border-radius: 7px; cursor: pointer; }
.dxs-crumb:hover { background: rgba(48,120,192,.12); color: var(--navy); }
.dxs-crumb.cur { color: var(--cyan-text, #2563eb); }
.dxs-crumb-sep { color: var(--ink-3); font-size: 11px; }
.dxs-sec { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); padding: 8px 12px 4px; }
/* Problem-list filter/search empty state */
.pl-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 20px; color: var(--ink-3); text-align: center; }
.pl-empty svg { color: var(--ink-3); opacity: .7; }
.pl-empty span { font-size: 12.5px; }
/* Row keyboard focus — subtle inset ring so it reads as selected, not just outlined */
.pl-item:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--cyan); border-radius: var(--r-sm); }
/* Chart-supported code (patient context) + row highlight */
.dx-supported { display: inline-block; margin-left: 8px; font-size: 10px; font-weight: 650; color: #0f7a3d; background: rgba(22,163,74,.14); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.dx-onlist { display: inline-block; margin-left: 8px; font-size: 10px; font-weight: 650; color: var(--ink-3); background: rgba(24,36,96,.08); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.dx-res.dx-onl { opacity: .62; }
.dx-res.dx-sup { background: rgba(22,163,74,.06); box-shadow: inset 3px 0 0 #16a34a; }
/* Excludes1 guardrail banner + code-also suggestions in the Add modal */
.dx-guard { margin-top: 8px; border-radius: 10px; font-size: 12.5px; flex: 0 0 auto; max-height: 34vh; overflow-y: auto; }
/* "This diagnosis" builder bar — live review of primary + linked codes before Add */
.dx-review { flex: 0 0 auto; border: 1px solid var(--cyan, #3078c0); background: rgba(48,120,192,.05); border-radius: 12px; padding: 9px 12px; }
.dxr-h { font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--cyan-text, #2563eb); margin-bottom: 7px; }
.dxr-chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.dxr-chip { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 12px; box-shadow: var(--shadow); }
.dxr-chip.dxr-primary { border-color: var(--cyan, #3078c0); background: rgba(48,120,192,.10); padding-right: 11px; }
.dxr-chip.dxr-also { border-style: dashed; }
.dxr-chip .dxr-code { font-weight: 700; color: var(--navy); }
.dxr-chip .dxr-desc { color: var(--ink-2); }
.dxr-x { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: none; background: rgba(24,36,96,.08); color: var(--ink-2); border-radius: 50%; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; transition: background .12s, color .12s; }
.dxr-x:hover { background: var(--danger, #e5484d); color: #fff; }
.dxr-hint { font-size: 11.5px; color: var(--ink-3); font-style: italic; }
.dxr-raf { color: #2c7a4b; font-weight: 800; text-transform: none; letter-spacing: 0; }
/* specification-upgrade banner */
.dx-upgrade { flex: 0 0 auto; border: 1px solid rgba(180,120,10,.35); background: #fff8ec; border-radius: 12px; padding: 9px 12px; }
.dx-up-h { font-size: 12.5px; font-weight: 700; color: #6b4e10; margin-bottom: 6px; }
.dx-up-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink); padding: 3px 0; cursor: pointer; }
.dx-up-row input { flex-shrink: 0; }
.dx-up-tag { font-size: 10.5px; font-weight: 700; color: #8a5a10; background: rgba(180,120,10,.14); padding: 1px 7px; border-radius: 999px; }
/* code-first section (mirrors code-also) */
.dx-guard-first { background: rgba(120,90,200,.06); border: 1px solid rgba(120,90,200,.3); padding: 8px 11px; margin-top: 6px; border-radius: 8px; }
.dx-guard-first .dx-first-h { font-weight: 650; color: #6a4fb0; margin-bottom: 5px; }
/* MEAT capture */
.dx-meat { flex: 0 0 auto; border: 1px solid var(--line-2); background: var(--glass-strong); border-radius: 12px; padding: 9px 12px; }
.dx-meat-h { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.dx-meat-sub { font-weight: 500; color: var(--ink-3); }
.dx-meat-inp { width: 100%; padding: 8px 11px; border: 1px solid var(--glass-border); border-radius: 9px; background: #fff; font-size: 13px; outline: none; }
.dx-guard-warn { background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.35); color: #991b1b; padding: 8px 11px; }
.dx-guard-warn b { color: #7f1d1d; }
.dx-guard-also { background: rgba(48,120,192,.06); border: 1px solid var(--cyan); padding: 8px 11px; margin-top: 6px; }
.dx-guard-also .dx-also-h { font-weight: 650; color: var(--cyan-text, #2563eb); margin-bottom: 5px; }
.dx-also-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid var(--cyan); border-radius: 999px; padding: 3px 10px; margin: 0 5px 5px 0; cursor: pointer; }
.dx-also-chip:hover { background: rgba(48,120,192,.12); }
.dx-also-chip .chip.hcc { font-size: 9px; }

/* dual-code companion picker + synopsis + controlled status */
/* Cap height + scroll internally so it never clips behind the modal footer; results
   above shrink to share the space (flex-shrink lets the ladder give up room). */
.dx-companion { flex: 0 1 auto; max-height: 34vh; overflow-y: auto; border: 1px solid var(--cyan); border-radius: 12px; background: var(--glass-strong, #fff); }
/* Opaque + on top so scrolling rows pass cleanly beneath it (was translucent → text bled through). */
.dx-comp-h { position: sticky; top: 0; z-index: 2; background: #e8f1fb; border-bottom: 1px solid var(--cyan); }
.dx-comp-h { font-size: 12px; font-weight: 650; color: var(--cyan-text); padding: 9px 12px; background: rgba(48,120,192,.10); border-bottom: 1px solid var(--line-2); }
.dx-comp-sub { font-weight: 500; color: var(--ink-3); text-transform: none; }
.dx-dual { font-size: 10px; font-weight: 650; color: var(--ok); background: rgba(22,163,74,.12); padding: 1px 7px; border-radius: 999px; }
.pl-syn { font-size: 12px; font-style: italic; color: var(--ink-2); margin-top: 4px; padding-left: 1px; }
.pl-status.ctrl { color: var(--ok); }

/* ===== Annual HCC recapture ===== */
/* toolbar right group: compact sort + recapture chip share the filter row */
.pl-toolbar-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.pl-sort-sel { font: inherit; font-size: 12px; font-weight: 600; color: var(--ink); padding: 4px 24px 4px 9px; border: 1px solid var(--line); border-radius: 9px; background-color: #fff; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6078' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; cursor: pointer; }
.pl-sort-sel:hover { border-color: var(--cyan); }
/* compact recapture chip (in toolbar) that expands a detail panel below */
.pl-recap-toggle { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 11.5px; font-weight: 650; color: #92600a; background: rgba(245,158,11,.16); border: 1px solid rgba(240,198,107,.7); border-radius: 999px; padding: 4px 8px; cursor: pointer; transition: background .15s; }
.pl-recap-toggle:hover, .pl-recap-toggle.on { background: rgba(245,158,11,.26); }
.pl-recap-i { font-size: 11px; line-height: 1; }
.pl-recap-cv { width: 12px; height: 12px; opacity: .65; }
.pl-recap.open { margin: 0 12px 9px; border: 1px solid #f0c66b; border-radius: 12px; background: linear-gradient(180deg, rgba(245,158,11,.10), rgba(245,158,11,.04)); }
.pl-recap-detail { padding: 10px 12px 11px; }
.pl-recap-detail p { font-size: 11.5px; color: var(--ink-2); line-height: 1.4; margin: 0 0 9px; }
.pl-recap-btn { width: 100%; justify-content: center; }
.pl-recap-chip { display: inline-block; margin-left: 6px; font-size: 9px; font-weight: 650; padding: 1px 6px; border-radius: 999px; vertical-align: middle; }
.pl-recap-chip.warn { color: #92600a; background: rgba(245,158,11,.16); }
.pl-recap-chip.staged { color: var(--cyan-text); background: rgba(48,120,192,.14); }
.pl-recap-chip.ok { color: var(--ok); background: rgba(22,163,74,.12); }

/* ===== Inline suspected / capture opportunities ===== */
.pl-sugbox { margin: 4px 12px 10px; border: 1px solid rgba(22,163,74,.35); border-radius: 12px; background: linear-gradient(180deg, rgba(22,163,74,.07), rgba(22,163,74,.03)); overflow: hidden; }
.pl-sugbox-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; font-size: 12px; font-weight: 650; color: #15803d; background: rgba(22,163,74,.10); }
.pl-sugbox-n { font-size: 11px; background: rgba(22,163,74,.18); color: #15803d; padding: 1px 8px; border-radius: 999px; }
.pl-sug2 { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid rgba(22,163,74,.14); }
.pl-sug2-main { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink); }
.pl-sug2-main b { color: var(--navy); }
.pl-sug2-e { font-size: 11px; color: var(--ink-2); margin-top: 1px; }
.pl-sug2-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pl-viewsmart { display: block; width: 100%; text-align: left; padding: 7px 12px; border-top: 1px solid rgba(22,163,74,.14); font-size: 12px; }

/* ===== MEAT status + provenance ===== */
.pl-meat { display: inline-block; margin-left: 6px; font-size: 9px; font-weight: 650; letter-spacing: .2px; padding: 1px 5px; border-radius: 999px; vertical-align: middle; cursor: default; }
.pl-meat.ok { color: var(--ok); background: rgba(22,163,74,.12); }
.pl-meat.warn { color: #92600a; background: rgba(245,158,11,.16); }
.pl-meat.bad { color: var(--danger); background: rgba(220,38,38,.12); }
.pl-prov { font-size: 11px; color: var(--ink-3); margin-bottom: 6px; }
.pl-addr { margin-left: 6px; font-size: 9.5px; color: var(--ink-3); vertical-align: middle; }
.pl-addr.none { color: #b45309; font-style: italic; }

/* ===== Sort/filter toolbar + duplicate banner ===== */
.pl-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 7px; flex-wrap: wrap; padding: 5px 12px 7px; }
.pl-sort-sel:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(48,120,192,.15); }
.pl-dup { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 12px 10px; padding: 7px 12px; font-size: 12px; color: #92600a; background: rgba(245,158,11,.10); border: 1px solid rgba(245,158,11,.35); border-radius: 10px; }

/* ===== Actions menus (per-problem + block) ===== */
.pl-actions, .pl-blockact { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--ink-2); background: rgba(24,36,96,.05); border: 1px solid var(--line); padding: 4px 9px; border-radius: 8px; flex-shrink: 0; }
.pl-actions:hover, .pl-blockact:hover { background: rgba(48,120,192,.12); color: var(--navy); border-color: var(--cyan); }
.pl-blockact { margin-left: 6px; }
.pl-row .pl-actions { opacity: .6; transition: opacity .12s; }
.pl-row:hover .pl-actions { opacity: 1; }
.wp-menu { z-index: 200; min-width: 220px; background: var(--glass-strong); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: 11px; box-shadow: var(--shadow-lg); padding: 5px; animation: fade .12s ease; }
.wp-menu-item { display: block; width: 100%; text-align: left; background: none; border: none; font-size: 13px; font-weight: 600; color: var(--ink); padding: 8px 11px; border-radius: 8px; }
.wp-menu-item:hover { background: rgba(48,120,192,.12); color: var(--navy); }
.wp-menu-item.danger { color: var(--danger); }
.wp-menu-item.danger:hover { background: rgba(229,72,77,.12); }
.wp-menu-item[disabled] { color: var(--ink-3); opacity: .6; cursor: default; }
.wp-menu-sep { height: 1px; background: var(--line-2); margin: 4px 6px; }

/* ===== Edit Patient Problem modal ===== */
.ep-card { width: 96%; max-width: 720px; max-height: 88vh; display: flex; flex-direction: column; }
.ep-body { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.ep-dx { width: 100%; border-collapse: collapse; font-size: 13px; }
.ep-dx thead th { text-align: left; font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); padding: 4px 8px; border-bottom: 1px solid var(--line); }
.ep-dx tbody td { padding: 9px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.ep-dxdesc { font-weight: 600; color: var(--ink); }
.ep-mono { font-family: 'SF Mono', ui-monospace, monospace; font-size: 12px; white-space: nowrap; }
.ep-dim { color: var(--ink-3); }
.ep-risk { font-weight: 700; color: var(--gold); }
.ep-x { background: none; border: none; color: var(--ink-3); font-size: 15px; line-height: 1; padding: 0 4px; }
.ep-x:hover { color: var(--danger); }
.ep-empty { color: var(--ink-3); text-align: center; padding: 14px; font-size: 12.5px; }
.ep-addwrap { }
.ep-search { position: relative; margin-top: 8px; }
.ep-search input { width: 100%; padding: 9px 12px; border: 1px solid var(--glass-border); border-radius: 10px; background: rgba(255,255,255,.7); font-size: 13px; }
.ep-facets { display: none; flex-wrap: wrap; gap: 6px; align-items: center; row-gap: 6px; margin-top: 8px; }
.ep-recap { margin-top: 12px; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.ep-recap-h { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); padding: 8px 12px; background: rgba(24,36,96,.04); }
.ep-recap-empty { font-size: 12px; color: var(--ink-3); padding: 10px 12px; font-style: italic; }
.ep-recap-row { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; background: none; border: none; border-top: 1px solid var(--line-2); padding: 8px 12px; cursor: pointer; }
.ep-recap-row:hover { background: rgba(48,120,192,.08); }
.ep-recap-date { font-size: 12.5px; font-weight: 700; color: var(--navy); }
.ep-recap-meta { font-size: 11px; color: var(--cyan-text); }
.ep-fields { display: flex; flex-direction: column; gap: 11px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.ep-f { display: grid; grid-template-columns: 90px 1fr; align-items: start; gap: 12px; font-size: 13px; }
.ep-f.ep-f-full { display: block; }
.ep-f > span { font-weight: 600; color: var(--ink-2); padding-top: 8px; }
.ep-f > span.req::before { content: '* '; color: var(--danger); }
.ep-f input, .ep-f textarea { padding: 8px 11px; border: 1px solid var(--glass-border); border-radius: 9px; background: rgba(255,255,255,.7); font-size: 13px; font-family: var(--font); width: 100%; }
.ep-status { display: flex; gap: 18px; align-items: center; padding-top: 7px; }
.ep-status label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--ink); }
.pl-t-click { cursor: pointer; color: var(--cyan-text); }
.pl-t-click:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ===== Problem List — DENSE, scannable rows (two tight lines max per problem) ===== */
.pl-sec { padding: 0; }
.pl-sec-h { padding: 6px 12px 2px; font-size: 10px; }
.pl-fam-h { padding: 3px 12px; font-size: 11px; font-weight: 700; background: none; color: var(--ink-2); gap: 5px; }
.pl-fam-h:hover { background: rgba(24,36,96,.04); color: var(--navy); }
.pl-fam-h i { width: 12px; height: 12px; opacity: .55; }
.pl-fam-n { color: var(--ink-3); font-weight: 600; font-size: 10.5px; }
.pl-item { border-bottom: 1px solid var(--line-2); }
.pl-row { padding: 6px 12px 6px 4px; gap: 4px; align-items: flex-start; }
.pl-exp { padding: 0 1px; align-self: flex-start; margin-top: 2px; }
.pl-exp i { width: 13px; height: 13px; }
.pl-main { flex: 1; min-width: 0; }
/* line 1: title (truncates to one line) + codes */
.pl-line { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; line-height: 1.3; min-width: 0; }
.pl-yr { color: var(--ink-3); font-size: 10px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
/* Diagnosis name owns the full row width and wraps to 2 lines instead of truncating —
   the name is the most important thing in the row; codes moved to the meta strip. */
.pl-t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  font-weight: 600; font-size: 13px; line-height: 1.34; color: var(--ink); letter-spacing: -.005em; }
.pl-t-click { color: var(--cyan-text); cursor: pointer; }
.pl-t-click:hover { text-decoration: underline; text-underline-offset: 2px; }
.pl-codes { font-family: var(--mono); font-size: 10px; color: var(--ink-3); opacity: .9; font-variant-numeric: tabular-nums; }
/* line 2: three-zone meta strip — reference (left, flexible) · flags (right-aligned) ·
   RAF (fixed-width rightmost column, so the value lands at the same x on every row). */
.pl-chips { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; font-size: 10px; line-height: 1.4; }
.pl-meta-l { flex: 1 1 auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; min-width: 0; }
.pl-flags { margin-left: auto; flex: 0 0 auto; display: flex; align-items: center; gap: 9px; padding-left: 8px; }
.pl-meta-r { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.pl-dot { color: var(--ink-3); opacity: .45; font-size: 10px; }
.pl-hcc { font-size: 10px; font-weight: 600; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-raf { font-size: 10px; font-weight: 700; color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-meta { font-size: 10px; font-weight: 600; color: var(--gold); white-space: nowrap; }
/* Action flags: ICON-ONLY (hover tooltip + aria-label) — labels crowded the strip. */
.pl-flag { display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); cursor: default; }
.pl-flag i, .pl-flag svg { width: 14px; height: 14px; stroke-width: 2.1; }
.pl-flag.warn { color: var(--warn-text); }
.pl-flag.info { color: var(--cyan-text); }
.pl-flag.ok { color: var(--ok-text); }
.pl-recap-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; font-weight: 650; white-space: nowrap; }
.pl-recap-chip.warn { color: var(--warn-text); }
.pl-recap-chip.staged { color: var(--cyan-text); }
/* MEAT documentation score → small clipboard icon + 4-segment meter, no word. */
.pl-meat { display: inline-flex; align-items: center; gap: 4px; background: none; padding: 0; }
.pl-meat-ic { width: 13px; height: 13px; stroke-width: 2.1; color: var(--ink-3); }
.pl-meat-bar { display: inline-flex; gap: 2px; }
.pl-meat-seg { width: 5px; height: 5px; border-radius: 1.5px; background: var(--line); }
.pl-meat.bad .pl-meat-ic { color: var(--danger-text); }
.pl-meat.warn .pl-meat-ic { color: var(--warn-text); }
.pl-meat.ok .pl-meat-ic { color: var(--ok-text); }
.pl-meat.bad .pl-meat-seg.on { background: var(--danger-text); }
.pl-meat.warn .pl-meat-seg.on { background: var(--warn-text); }
.pl-meat.ok .pl-meat-seg.on { background: var(--ok-text); }
/* A touch more breathing room between icon-only flags. */
.pl-flags { gap: 9px; }
.pl-addr { font-size: 10px; color: var(--ink-3); font-weight: 500; }
.pl-haveap { font-size: 10px; font-weight: 700; color: var(--cyan-text); background: none; padding: 0; border-radius: 0; }
.pl-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--warn); background: rgba(217,119,6,.12); padding: 1px 6px; border-radius: 6px; }
.pl-tag.ctrl { color: var(--ok); background: rgba(22,163,74,.12); }
.pl-syn { font-size: 11px; font-style: italic; color: var(--ink-2); margin-top: 3px; line-height: 1.35; }
.pl-actions { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 24px; padding: 0; background: none; border: none; color: var(--ink-3); border-radius: 7px; flex-shrink: 0; opacity: .5; transition: opacity .12s; }
.pl-actions i { width: 16px; height: 16px; }
.pl-actions:hover { background: rgba(48,120,192,.12); color: var(--navy); }
/* Row hover affordance + reveal the ⋯ actions only on hover/focus (quiet otherwise). */
.pl-item { transition: background var(--dur-fast) var(--ease); }
.pl-item:hover { background: rgba(48,120,192,.045); }
.pl-row .pl-actions { opacity: 0; }
.pl-item:hover .pl-actions, .pl-item:focus-within .pl-actions, .pl-item-sel .pl-actions { opacity: 1; }
@media (hover: none) { .pl-row .pl-actions { opacity: .55; } }
/* Density — compact: single-line names (ellipsis + hover tooltip) and tighter rows. */
.pl-compact .pl-t { display: block; -webkit-line-clamp: unset; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-compact .pl-row { padding-top: 5px; padding-bottom: 5px; }
.pl-compact .pl-chips { margin-top: 2px; }
.pl-compact .pl-syn { display: none; }

/* fix: status radios were inheriting the full-width .ep-f input style → overlap */
.ep-status input[type="radio"] { width: 16px; height: 16px; padding: 0; border: 1px solid var(--glass-border); accent-color: var(--cyan); flex: none; margin: 0; }
.ep-status label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }

/* ===== Risk Assessment Details modal ===== */
.ra-card { width: 96%; max-width: 600px; max-height: 88vh; display: flex; flex-direction: column; }
.ra-tabs { display: flex; gap: 4px; padding: 10px 18px 0; }
.ra-tab { background: none; border: 1px solid transparent; font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 7px 14px; border-radius: 9px 9px 0 0; }
.ra-tab:hover { color: var(--navy); }
.ra-tab.active { color: #fff; background: var(--cyan); }
.ra-body { padding: 14px 20px; overflow-y: auto; }
.ra-head { display: flex; justify-content: space-between; font-size: 16px; font-weight: 750; color: var(--navy); border-bottom: 2px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.ra-row { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 13.5px; color: var(--ink); }
.ra-row .ra-val, .ra-row span:last-child { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 700; white-space: nowrap; }
.ra-int .ra-desc { color: var(--ink-2); font-style: italic; }
.ra-strong { font-weight: 650; color: var(--navy); } .ra-strong span:last-child { color: var(--gold); }
.ra-dim span { color: var(--ink-3) !important; font-weight: 600; }
.ra-sep { height: 1px; background: var(--line); margin: 8px 0; }
.ra-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 8px; border-top: 2px solid var(--line); }
.ra-total span:first-child { font-size: 22px; font-weight: 800; color: var(--navy); }
.ra-total span:last-child { font-size: 30px; font-weight: 800; color: var(--gold); }
.ra-note { font-size: 11px; color: var(--ink-3); margin-top: 14px; line-height: 1.5; }

.ra-sub { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); margin: 14px 0 4px; }

/* HPI → Dx modal + button */
/* HPI → Dx is a SECONDARY action — lighter outline so the primary "Add" leads. */
.pl-hpi { color: var(--navy); background: var(--glass-strong); border: 1px solid var(--line); box-shadow: none; }
.pl-hpi:hover { background: rgba(48,120,192,.10); border-color: var(--cyan); }
.hpi-card { max-width: 720px; width: 92vw; }
.hpi-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.hpi-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hpi-age { width: 160px; font-size: 13px; padding: 7px 10px; border: 1px solid var(--glass-border); border-radius: 9px; }
.hpi-text { width: 100%; font-size: 13.5px; padding: 10px 12px; border: 1px solid var(--glass-border); border-radius: 11px; resize: vertical; line-height: 1.5; }
.hpi-actions { display: flex; }
.hpi-results { display: flex; flex-direction: column; gap: 9px; max-height: 46vh; overflow-y: auto; }
.hpi-h { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); margin-top: 4px; }
.hpi-empty { font-size: 12.5px; color: var(--ink-3); font-style: italic; padding: 8px 2px; }
.hpi-cand { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: rgba(255,255,255,.55); }
.hpi-cand.redflag { border-color: #f0b9b0; background: linear-gradient(180deg,#fff6f4,#fff); }
.hpi-cand-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hpi-code { font-family: var(--mono, ui-monospace, monospace); color: var(--navy); font-size: 13px; }
.hpi-label { font-weight: 600; font-size: 13px; color: var(--ink); }
.hpi-lk { font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; padding: 2px 7px; border-radius: 20px; }
.hpi-lk.hi { background: #dcfce7; color: #15803d; } .hpi-lk.mid { background: #fef3c7; color: #b45309; } .hpi-lk.lo { background: var(--line-2); color: var(--ink-2); }
.hpi-rf { font-size: 10.5px; font-weight: 700; color: #b91c1c; margin-left: auto; }
.hpi-why { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.45; }
.hpi-wu { font-size: 12.5px; color: var(--ink); margin-top: 4px; line-height: 1.45; }
.hpi-wu b { color: var(--navy); }
.hpi-cand-act { display: flex; gap: 14px; margin-top: 7px; }
.hpi-plan { margin-top: 8px; }
.hpi-plan-ta { width: 100%; font-size: 12.5px; padding: 9px 11px; border: 1px solid #cfe0f5; border-radius: 10px; background: linear-gradient(180deg,#f6faff,#eef5ff); line-height: 1.5; resize: vertical; }

/* Plan MEAT + data-gap status strip */
.pa-status { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 11.5px; }
.pa-status:empty { display: none; }
.pa-meat { font-weight: 650; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; padding: 3px 9px; border-radius: 20px; }
.pa-meat.ok { background: #dcfce7; color: #15803d; }
.pa-meat.no { background: #fef3c7; color: #b45309; }
.pa-gaps { color: var(--ink-3); display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.pa-gaps.ok { color: #15803d; }
.pa-gap { background: rgba(180,83,9,.10); color: #b45309; padding: 2px 8px; border-radius: 7px; font-weight: 600; }

/* Problem-list UX: search, dismiss, saved-state, source badge, gap-order buttons */
.pl-search { font-size: 12px; padding: 5px 10px; border: 1px solid var(--glass-border); border-radius: 8px; width: 150px; background: rgba(255,255,255,.7); }
.pl-search:focus { outline: none; border-color: var(--cyan); width: 190px; transition: width .15s; }
.pl-sug2 { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border-top: 1px solid rgba(21,128,61,.10); }
.pl-sug2-title { line-height: 1.35; }
.pl-sug2-x { flex-shrink: 0; width: 24px; height: 24px; border: none; background: none; color: var(--ink-3); border-radius: 7px; font-size: 13px; cursor: pointer; }
.pl-sug2-x:hover { background: rgba(0,0,0,.06); color: var(--danger, #b91c1c); }
.pa-gap { border: 1px solid rgba(180,83,9,.25); background: rgba(180,83,9,.10); color: #b45309; padding: 2px 8px; border-radius: 7px; font-weight: 600; font-size: 11px; cursor: pointer; }
.pa-gap:hover { background: rgba(180,83,9,.20); }
.pa-save { display: flex; align-items: center; gap: 10px; }
.pa-saved { font-size: 11.5px; font-weight: 600; }
.pa-saved.ok { color: #15803d; }
.pa-saved.dirty { color: #b45309; }
.pd-srcrow { margin-top: 5px; }
.pd-src { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--navy); background: rgba(48,120,192,.08); border: 1px solid rgba(48,120,192,.18); padding: 3px 9px; border-radius: 20px; }
.emr-toast-act { margin-left: 12px; background: none; border: none; color: #7fd0ff; font-weight: 700; cursor: pointer; font-size: 13px; }

/* Problem number badge */
.pl-num { flex-shrink: 0; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink-3); background: var(--line-2); border-radius: 6px; margin-top: 1px; }
.pl-item-sel .pl-num { background: var(--navy); color: #fff; }

/* Coding upgrade chip + redundancy consolidation */
.pl-upg { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; font-weight: 700; color: #1d4ed8; background: rgba(37,99,235,.10); border: 1px solid rgba(37,99,235,.28); border-radius: 20px; padding: 3px 10px; cursor: pointer; }
.pl-upg:hover { background: rgba(37,99,235,.18); }
.pl-redun span { color: #b45309; }
.rd-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rd-row:first-child { border-top: none; }
.rd-main { flex: 1; font-size: 13px; }
.rd-why { font-size: 12px; color: var(--ink-2); margin-top: 4px; line-height: 1.45; }
.rd-remove { flex-shrink: 0; }

/* Linked status/companion codes on the problem detail */
.pd-links { margin-top: 5px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); }
.pd-link { font-size: 11px; font-weight: 600; color: var(--navy); background: rgba(48,120,192,.08); border: 1px solid rgba(48,120,192,.18); border-radius: 20px; padding: 3px 9px; cursor: pointer; }
.pd-link:hover { background: rgba(48,120,192,.16); }

/* Health maintenance panel */
.pd-hm:empty { display: none; }
.pd-hm-list { display: flex; flex-direction: column; gap: 4px; }
.pd-hm-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 4px 0; border-bottom: 1px solid var(--line-2); }
.pd-hm-row:last-child { border-bottom: none; }
.pd-hm-lbl { flex: 1; min-width: 0; color: var(--ink); }
.pd-hm-lbl em { font-style: normal; color: var(--ink-3); }
.pd-hm-mid { flex-shrink: 0; }
.hm-done { color: #15803d; font-weight: 600; }
.hm-due { color: #b91c1c; font-weight: 700; }
.hm-next { color: var(--ink-3); }
.hm-ok { color: #15803d; font-weight: 600; font-size: 11px; }
.hm-btn { flex-shrink: 0; font-size: 11px; padding: 3px 10px; }
.hm-presets { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.hm-preset { text-align: left; font-size: 12.5px; white-space: normal; }
/* Plan history */
.pa-history { margin-left: auto; color: var(--navy); }
.ph-list { display: flex; flex-direction: column; gap: 6px; }
.ph-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: rgba(255,255,255,.6); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; cursor: pointer; }
.ph-row:hover { background: #fff; box-shadow: var(--shadow); }
.ph-date { font-weight: 700; color: var(--navy); font-size: 12.5px; min-width: 96px; }
.ph-prev { flex: 1; min-width: 0; color: var(--ink-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-go { color: var(--cyan-text); font-weight: 600; font-size: 11px; }

.ph-cur { font-style: normal; font-size: 10px; font-weight: 700; color: #15803d; background: #dcfce7; padding: 1px 6px; border-radius: 10px; margin-left: 6px; }

.pa-segrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* one-click AI plan suggestions */
.pa-suggestions { border: 1px solid rgba(120,90,200,.28); background: rgba(120,90,200,.05); border-radius: 11px; padding: 9px 11px; }
.pa-sugg-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #6a4fb0; margin-bottom: 7px; }
.pa-sugg-chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid rgba(120,90,200,.4); border-radius: 999px; padding: 5px 12px; margin: 0 6px 6px 0; cursor: pointer; transition: background .12s, color .12s; max-width: 100%; text-align: left; }
.pa-sugg-chip:hover { background: rgba(120,90,200,.12); }
.pa-sugg-chip.added { background: rgba(44,122,75,.12); border-color: rgba(44,122,75,.4); color: #2c7a4b; cursor: default; }
.pa-sugg-empty { font-size: 12px; color: var(--ink-3); }

/* ═══ Vitals (center, smart tiles) ═══ */
.vit-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 4px; }
.vit-when { font-size: 11.5px; color: var(--ink-3); }
.vit-hist { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--cyan-text); cursor: pointer; }
.vit-hist i, .vit-hist svg { width: 13px; height: 13px; }
.vit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 9px; padding: 4px 14px 14px; }
.vit-tile { background: var(--glass-strong); border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 12px; }
.vit-tile.warn { background: var(--warn-bg); border-color: rgba(180,120,20,.3); }
.vit-tile.bad { background: var(--danger-bg); border-color: rgba(200,40,40,.3); }
.vit-lbl { font-size: 11.5px; color: var(--ink-2); }
.vit-val { font-size: 22px; font-weight: 700; color: var(--navy); line-height: 1.15; margin-top: 1px; }
.vit-tile.bad .vit-val { color: var(--danger-text); }
.vit-tile.warn .vit-val { color: var(--warn-text); }
.vit-unit { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.vit-trend { font-size: 11px; margin-top: 2px; }
.vit-trend i, .vit-trend svg { width: 12px; height: 12px; vertical-align: -1px; }
.vt-bad { color: var(--danger-text); font-weight: 600; }
.vt-warn { color: var(--warn-text); font-weight: 600; }
.vt-ok { color: #2c7a4b; font-weight: 600; }
.vt-flat { color: var(--ink-3); }
.vit-inrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vit-inrow .alg-lbl em { font-style: normal; color: var(--ink-3); font-weight: 400; }
.vh-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.vh-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-3); border-bottom: 1px solid var(--line-2); padding: 6px 8px; }
.vh-table td { padding: 7px 8px; border-bottom: 1px solid var(--line-2); }
.vh-act { text-align: right; white-space: nowrap; }

/* ═══ Labs (right lane, paneled) ═══ */
.lab-panel { border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; margin: 0 12px 8px; }
.lab-ph { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.lab-pt { font-size: 12.5px; font-weight: 700; color: var(--navy); }
.lab-pd { font-size: 11px; color: var(--ink-3); font-weight: 400; }
.lab-pill { font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.lab-pill.bad { background: var(--danger-bg); color: var(--danger-text); }
.lab-pill.ok { background: rgba(44,122,75,.12); color: #2c7a4b; }
.lab-body { display: flex; flex-wrap: wrap; gap: 3px 14px; font-size: 12px; }
.lab-item { color: var(--ink-2); white-space: nowrap; }
.lab-n { color: var(--ink-2); }
.lab-item b { color: var(--navy); }
.lab-item b.lab-hi { color: var(--danger-text); }
.lab-item b.lab-lo { color: var(--cyan-text); }
.lab-flag { font-size: 10px; font-weight: 700; color: var(--danger-text); }
.lab-trend { color: var(--ink-3); font-size: 11px; }
.lab-trend i, .lab-trend svg { width: 11px; height: 11px; vertical-align: -1px; }

/* ═══ Diagnostic workup (right lane, by system) ═══ */
.dg-sys { margin: 0 12px 10px; }
.dg-sys-h { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); margin: 4px 0 5px; }
.dg-sys-h i, .dg-sys-h svg { width: 14px; height: 14px; }
.dg-study { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0 4px 8px; border-left: 2px solid transparent; }
.dg-study.abn { border-left-color: var(--danger); }
.dg-study.fu { border-left-color: var(--warn-text); }
.dg-mod { width: 15px; height: 15px; color: var(--ink-3); margin-top: 2px; flex-shrink: 0; }
.dg-main { flex: 1; min-width: 0; }
.dg-t { font-size: 12.5px; color: var(--ink); }
.dg-d { font-size: 11px; color: var(--ink-3); }
.dg-fu { font-size: 10px; font-weight: 700; background: var(--warn-bg); color: var(--warn-text); padding: 0 6px; border-radius: 999px; }
.dg-imp { font-size: 11.5px; color: var(--ink-2); margin-top: 1px; }
.dg-imp.abn { color: var(--danger-text); }

/* ═══ AI clinical analysis panel ═══ */
.clin-analysis { margin: 6px 12px 10px; border: 1px solid rgba(120,90,200,.28); background: rgba(120,90,200,.05); border-radius: 10px; padding: 8px 11px; }
.clin-an-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #6a4fb0; margin-bottom: 5px; }
.clin-an-row { font-size: 12px; color: var(--ink-1); line-height: 1.5; padding: 3px 0; border-top: 1px solid rgba(120,90,200,.12); }
.clin-an-row:first-of-type { border-top: none; }

/* ═══ Patient banner — name + all chips on ONE vertically-centered row ═══ */
.subhead-id { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; }
.subhead-id h1 { flex: 0 0 auto; }
.subhead-main { flex-wrap: wrap; row-gap: 6px; }
.subhead-main .badges { display: none; }   /* status pills now live inside .demo */
.subhead-id .demo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 0; overflow: visible; white-space: normal; text-overflow: clip; }
/* vertical divider between demographics and the status pills */
.pchip-div { flex: 0 0 auto; width: 1px; height: 15px; background: var(--line); margin: 0 3px; }
/* Demographics read as light, secondary info — muted, borderless, not competing with
   the name or the colored status badges. */
.pchip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; color: var(--ink-2); background: transparent; border: none; padding: 2px 2px; white-space: nowrap; }
.pchip b { color: var(--ink); font-weight: 700; }
.pchip i, .pchip svg { width: 12px; height: 12px; color: var(--ink-3); }
.pchip + .pchip::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: var(--line); margin-right: 6px; flex-shrink: 0; }
.pchip-ins { color: var(--cyan-text); font-weight: 600; font-size: 11px; background: rgba(48,120,192,.08); border-radius: 999px; padding: 3px 11px; line-height: 1.35; }
.pchip-ins::before { display: none !important; }
.pchip-ins i, .pchip-ins svg { color: var(--cyan-text); }
.pchip-appt { cursor: pointer; border: none; background: none; font: inherit; color: var(--ink-2); }
.pchip-appt:hover { color: var(--cyan-text); }
.pchip-appt.pchip-appt-has .pchip-appt-txt { color: var(--cyan-text); font-weight: 600; }
.pchip-add { cursor: pointer; color: var(--cyan-text); font-weight: 600; font-size: 11px; border: 1px dashed rgba(48,120,192,.45); border-radius: 999px; padding: 3px 11px; line-height: 1.35; }
.pchip-add::before { display: none !important; }
.pchip-add:hover { background: rgba(48,120,192,.08); }
.pl-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ptag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: #6a4fb0; background: rgba(120,90,200,.1); border: 1px solid rgba(120,90,200,.28); padding: 2px 4px 2px 9px; border-radius: 999px; }
.ptag-x { border: none; background: none; color: #6a4fb0; cursor: pointer; font-size: 13px; line-height: 1; padding: 0 2px; border-radius: 50%; }
.ptag-x:hover { background: rgba(120,90,200,.2); }
.sactions { display: inline-flex; gap: 6px; margin-left: 4px; }
.subhead-main .sactions .btn-ghost { padding: 5px 11px; font-size: 12px; }
.subhead-main .sactions .btn-primary { padding: 6px 12px; font-size: 12.5px; }

/* ═══ Patient banner — two columns: identity+toolbar (left) · vitals panel (right) ═══ */
.subhead-split { display: flex; align-items: flex-start; gap: 0; }
.subhead-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
/* Line 2: the doctools toolbar and the Print / New Visit Note actions share one row */
.doctools-row { display: flex; align-items: center; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.doctools-row .doctools { flex: 1 1 auto; min-width: 0; }
.doctools-row .sactions { flex: 0 0 auto; margin-left: auto; }
.vit-panel { flex: 0 0 var(--vit-w, 330px); min-width: 0; padding: 0 0 0 16px; }
/* Drag handle between the identity column and the vitals widget */
.vit-grip { flex: 0 0 auto; align-self: stretch; width: 11px; margin: -2px 0; display: flex; align-items: center; justify-content: center; cursor: col-resize; touch-action: none; }
.vit-grip::before { content: ''; width: 2px; align-self: stretch; margin: 4px 0; border-radius: 3px; background: var(--line-2); transition: background .15s, width .15s; }
.vit-grip:hover::before, .vit-grip.dragging::before { background: var(--cyan); width: 3px; }
body.vit-resizing { cursor: col-resize; user-select: none; }
@media (max-width: 1100px) { .subhead-split { flex-direction: column; align-items: stretch; } .subhead-split > * { max-width: 100%; } .vit-grip { display: none; } .vit-panel { flex: 1 1 auto; border-top: 1px solid var(--line-2); padding: 8px 0 0 0; } }
.vit-p-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.vit-rib-lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); }
.vit-when { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-3); margin-left: 5px; }
.vit-rib-none { font-size: 12px; color: var(--ink-3); }
.vit-head-acts { display: flex; gap: 4px; flex-shrink: 0; }
.vit-ico { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: 7px; color: var(--cyan-text); background: none; cursor: pointer; transition: background .12s; }
.vit-ico:hover { background: rgba(48,120,192,.08); }
.vit-ico i, .vit-ico svg { width: 13px; height: 13px; }
/* Compact wrapping flow — the whole vitals set collapses to ~2 lines */
.vit-flow { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 3px; align-items: baseline; }
.vrt { display: inline-flex; align-items: baseline; gap: 4px; font: inherit; background: none; border: none; padding: 1px 3px; border-radius: 5px; cursor: pointer; transition: background .12s; }
.vrt:hover { background: rgba(48,120,192,.09); }
.vrt-l { font-size: 10px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .3px; }
.vrt-v { font-size: 13px; font-weight: 700; color: var(--navy); }
.vrt.bad .vrt-v { color: var(--danger-text); } .vrt.warn .vrt-v { color: var(--warn-text); }
.vrt-u { font-size: 10px; font-weight: 500; color: var(--ink-3); }
.vrt-t { font-size: 10px; font-weight: 700; }
.vt-spark { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; background: var(--glass-strong); }
.vt-spark-empty { font-size: 12px; color: var(--ink-3); padding: 20px; text-align: center; }

/* ═══ Workup toggle + study/lab detail ═══ */
.dg-toggle { display: inline-flex; gap: 2px; background: var(--line-2); border-radius: 8px; padding: 2px; margin: 0 12px 8px; }
.dg-tg { font-size: 11px; font-weight: 600; color: var(--ink-2); background: none; border: none; padding: 4px 11px; border-radius: 6px; cursor: pointer; }
.dg-tg.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.dg-study { cursor: pointer; border-radius: 6px; transition: background .12s; }
.dg-study:hover { background: rgba(48,120,192,.05); }
.sd-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.sd-flag { font-size: 12px; font-weight: 700; color: var(--danger-text); background: var(--danger-bg); padding: 5px 10px; border-radius: 8px; margin-bottom: 6px; }
.sd-fu { font-size: 12px; font-weight: 600; color: var(--warn-text); background: var(--warn-bg); padding: 5px 10px; border-radius: 8px; margin-bottom: 6px; }
.sd-h { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); margin: 10px 0 4px; }
.sd-imp { font-size: 13.5px; color: var(--ink); }
.sd-pre { font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.55; color: var(--ink-1); white-space: pre-wrap; background: var(--glass-strong); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; margin: 0; }
.lab-panel { cursor: pointer; transition: background .12s; }
.lab-panel:hover { background: rgba(48,120,192,.04); }
.lab-hist { font-size: 11px; color: var(--ink-3); }
.pa-history-top { color: var(--navy); font-weight: 700; white-space: nowrap; }

.pd-head-btns { display: flex; gap: 6px; flex-shrink: 0; }
.pd-hist { color: var(--navy); white-space: nowrap; }

.pd-refresh { padding: 6px 10px; font-size: 15px; line-height: 1; color: var(--navy); }
.pd-refresh:hover { background: rgba(48,120,192,.10); }

/* Checkboxes inside the Rx form must never inherit the 100%-width input rule —
   a full-width checkbox crushes its row's text into a sliver (order-set med cards). */
.rxp-form input[type="checkbox"] { width: 15px; height: 15px; flex: 0 0 auto; }
.os-med-t { flex: 1 1 auto; min-width: 0; }
.os-med-t em { white-space: normal; }
/* qty/day helper row — chips + calc hint live BELOW the grid, never inside narrow columns */
.rxp-gridfoot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: -8px; }
.rxp-gridfoot .rxp-sigq { margin-top: 0; }
.rxp-sigq-b { white-space: nowrap; }
.rxp-gridfoot .rxp-qtyhint { margin-top: 0; flex: 1 1 auto; text-align: left; }

/* Common chips: ONE compact line, horizontally scrollable — not a 3-row wall */
[data-pcpquick] { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); padding-bottom: 2px; }
[data-pcpquick]::-webkit-scrollbar { display: none; }
[data-pcpquick] .rxp-dose { padding: 3px 10px; font-size: 11px; flex: 0 0 auto; }
[data-pcpquick] .rxp-doses-l { flex: 0 0 auto; }

/* Common meds — collapsed one-line trigger; expands to a wrapped chip panel on click */
.rxp-common-t { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 6px; font: inherit; font-size: 11px; font-weight: 700; color: var(--cyan-text); background: none; border: none; padding: 2px 2px; cursor: pointer; }
.rxp-common-t:hover { color: var(--cyan-deep, var(--cyan-text)); }
.rxp-common-t i, .rxp-common-t svg { width: 12px; height: 12px; }
.rxp-common-t .rxp-common-ch { transition: transform .15s; }
.rxp-common-t.open .rxp-common-ch { transform: rotate(180deg); }
.rxp-common-body { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; padding: 9px 10px; border: 1px dashed var(--line); border-radius: 11px; background: rgba(24,36,96,.02); }
.rxp-common-body .rxp-dose { padding: 3px 10px; font-size: 11px; }

/* Kill dead vertical space in the Rx form */
.rxp-form { gap: 12px; }
.rxp-form .ta-code-hint:empty { display: none; }
.rxp-common-t { margin-top: 2px; padding: 0; }
.rxp-dxs { margin-top: 0; padding-top: 10px; gap: 5px; }
.rxp-med-row .alg-f { gap: 5px; }
/* PA queue + recalls */
.pa-pill { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.pa-needed { background: #fdf4e3; color: #8a5b0e; border: 1px solid #ecd9ae; }
.pa-submitted { background: #e6f0fb; color: #1b5fae; border: 1px solid #c3daf3; }
.pa-approved { background: #e9f5ec; color: #1d6b3a; border: 1px solid #cbe7d3; }
.pa-denied, .pa-appealed { background: #fdecea; color: #a02c20; border: 1px solid #f0c8c2; }
.pa-sel { font: inherit; font-size: 12px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--card, #fff); }
.q-note { font-size: 12.5px; color: var(--ink-soft, #4a5a61); background: #fdf6e3; border: 1px solid #ecd690; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.rxm-row.inorder { background: #eefaf0; border-color: #bfe6c8; }
.rxm-chk { width: 12px; height: 12px; color: #1d6b3a; margin-right: 4px; vertical-align: -2px; }
.rxm-b.on { color: #1d6b3a; background: #eefaf0; }
.pa-med { display: flex; flex-direction: column; gap: 2px; padding: 8px 2px 12px; }
.pa-med b { font-size: 14px; color: var(--ink); }
.pa-med span { font-size: 11.5px; color: var(--ink-3, #8a979d); }
.pa-steps { display: flex; gap: 4px; margin: 4px 0 12px; }
.pa-step { flex: 1; font: inherit; font-size: 11px; font-weight: 700; padding: 6px 4px; border: 1px solid var(--line); background: var(--bg, #f7fafb); color: var(--ink-3, #8a979d); cursor: pointer; text-align: center; }
.pa-step:first-child { border-radius: 8px 0 0 8px; } .pa-step:last-child { border-radius: 0 8px 8px 0; }
.pa-step.on { background: #e6f0fb; color: #1b5fae; border-color: #9cc0e8; }
.pa-step.on.good { background: #e9f5ec; color: #1d6b3a; border-color: #a7d6b4; }
.pa-step.on.bad { background: #fdecea; color: #a02c20; border-color: #f0c8c2; }
.pa-hint { font-size: 11.5px; color: var(--ink-soft, #4a5a61); background: #fdf6e3; border: 1px solid #ecd690; border-radius: 8px; padding: 7px 10px; margin-top: 8px; }
.pa-click { cursor: pointer; }
textarea[data-pf="just"] { font: inherit; font-size: 12.5px; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; resize: vertical; }
.rxp-epa { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--ink-3, #8a979d); background: none; border: 1px dashed var(--line, #dde3e6); border-radius: 8px; padding: 5px 11px; cursor: pointer; margin-top: 8px; align-self: flex-start; }
.rxp-epa:hover { color: var(--cyan-text); border-color: var(--cyan-text); }
.rxp-epa.likely { color: #8a5b0e; background: #fdf6e3; border: 1px solid #ecd690; }
.rxp-epa.likely:hover { background: #fbf0d6; color: #6b5210; border-color: #ecd690; }
.rxp-epa i, .rxp-epa svg { width: 13px; height: 13px; }
/* CPOE — imaging + lab ordering */
.cpoe-card { width: 980px; max-width: 96vw; }
.cpoe-pt { font-size: 12px; color: var(--ink-3, #8a979d); margin-left: 10px; }
.cpoe-body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 0; max-height: 62vh; }
.cpoe-left { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.cpoe-right { border-left: 1px solid var(--line-2, #e3e9eb); padding: 14px 15px; overflow-y: auto; background: rgba(24,36,96,.02); }
.cpoe-guide { display: flex; flex-direction: column; gap: 6px; }
.cpoe-cart { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.cpoe-row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line-2, #e3e9eb); border-radius: 9px; padding: 7px 10px; }
.cpoe-row-m { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cpoe-row-m b { font-size: 12.5px; }
.cpoe-row-m span { font-size: 10.5px; color: var(--ink-3, #8a979d); }
.cpoe-lat { font: inherit; font-size: 11px; padding: 3px 6px; border: 1px solid var(--line, #dde3e6); border-radius: 6px; }
.cpoe-empty { font-size: 12px; color: var(--ink-3, #8a979d); padding: 8px 2px; }
.cpoe-count { font-size: 12px; font-weight: 700; color: var(--cyan-text); }
.cpoe-ck { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2, #4a5a61); padding: 3px 0; }
.cpoe-ck input { width: 14px; height: 14px; }
.cpoe-vendors { display: flex; gap: 4px; padding: 10px 16px 0; }
.cpoe-bundles, .cpoe-groups { display: flex; flex-wrap: wrap; gap: 5px; }
.cpoe-groups .rxp-sigq-b.on { background: var(--cyan-soft, #e0f5f7); }
.cpoe-grouptests { display: flex; flex-wrap: wrap; gap: 5px; }
.cpoe-safety { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
/* CPOE v2 */
.cpoe-body { height: 56vh; max-height: none; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.cpoe-left, .cpoe-right { min-height: 0; overflow-y: auto; }
.cpoe-searchrow { display: flex; gap: 8px; align-items: flex-end; }
.cpoe-ftbtn { flex: 0 0 auto; white-space: nowrap; }
.cpoe-ftform { display: flex; gap: 6px; align-items: center; background: var(--bg, #f5f8f9); border: 1px dashed var(--line); border-radius: 9px; padding: 8px 10px; }
.cpoe-ftform input, .cpoe-ftform select { font: inherit; font-size: 12.5px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; }
.cpoe-sysrow { display: flex; flex-wrap: wrap; gap: 5px; }
.cpoe-sysrow .rxp-sigq-b.on { background: var(--cyan-soft, #e0f5f7); }
.cpoe-syspanel { display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; }
.sysp-mod { width: 100%; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3, #8a979d); margin-top: 6px; }
.sysp-x { font: inherit; font-size: 11.5px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; color: var(--ink-2, #34424a); }
.sysp-x:hover { border-color: var(--cyan-text); color: var(--cyan-text); }
.sysp-x.on { background: #eefaf0; border-color: #bfe6c8; color: #1d6b3a; font-weight: 700; }
.sysp-addrow { display: flex; gap: 6px; width: 100%; margin-top: 10px; align-items: center; background: #fdf6e3; border: 1px dashed #ecd690; border-radius: 9px; padding: 7px 9px; }
.sysp-addrow input, .sysp-addrow select { font: inherit; font-size: 12px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; flex: 1; min-width: 0; }
.cpoe-cartbar { border-top: 2px solid var(--line-2, #e3e9eb); padding: 8px 16px 4px; background: rgba(24,36,96,.02); }
.cpoe-cartbox { max-height: 132px; overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: 5px; margin-top: 6px; padding-bottom: 6px; }
.cpoe-actions { display: flex; gap: 8px; }
.cpoe-actions .cal-btn i, .cpoe-actions .cal-btn svg { width: 13px; height: 13px; margin-right: 3px; vertical-align: -2px; }
.att-tree { display: flex; flex-direction: column; gap: 2px; }
.att-sec .att-items { display: none; padding-left: 14px; }
.att-sec.open .att-items { display: block; }
.att-h { display: flex; align-items: center; gap: 5px; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2, #34424a); background: none; border: none; padding: 4px 0; cursor: pointer; width: 100%; text-align: left; }
.att-h i, .att-h svg { width: 13px; height: 13px; }
.att-n { font-size: 10px; color: var(--ink-3, #8a979d); background: var(--bg, #eef2f4); border-radius: 999px; padding: 0 6px; }
/* order loop */
.loop-b { margin-bottom: 14px; }
.loop-bh { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2, #34424a); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.loop-bsub { font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-3, #8a979d); }
.q-card.loop-over { border-left: 3px solid #a02c20; }
/* CPOE v3 — smart dx + protocol */
.cpoe-req { color: #a02c20; font-size: 9px; font-weight: 800; margin-left: 4px; }
.cpoe-dxsel { font-size: 12.5px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; margin: 3px 0 6px; display: flex; align-items: center; gap: 6px; }
.cpoe-dxchips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.dx-chip { font: inherit; font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-2, #34424a); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-chip.chart { background: #fdf9ee; border-color: #ecd690; }
.dx-chip:hover { border-color: var(--cyan-text); color: var(--cyan-text); }
.dx-chip.on { background: var(--cyan-soft, #e0f5f7); border-color: var(--cyan-text); color: var(--cyan-text); font-weight: 700; }
.cpoe-proto { display: flex; flex-direction: column; gap: 4px; }
.proto-line { font-size: 11.5px; color: var(--ink-2, #34424a); line-height: 1.45; padding: 2px 0; }
.proto-line.path { background: #e6f0fb; border: 1px solid #c3daf3; border-radius: 8px; padding: 7px 10px; color: #1b5fae; font-weight: 600; }
.proto-line.allergy { background: #fdecea; border: 1px solid #f0c8c2; border-radius: 8px; padding: 7px 10px; color: #a02c20; }
.proto-line.hold { background: #fdf6e3; border: 1px solid #ecd690; border-radius: 8px; padding: 6px 10px; color: #6b5210; }
.proto-line.clin { color: var(--ink-3, #8a979d); font-size: 11px; }
.cpoe-draftbar { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; background: #eef4fb; border: 1px dashed #c3daf3; border-radius: 9px; padding: 7px 10px; }
/* CPOE v3 UI polish */
.cpoe-tabs { display: flex; gap: 2px; margin-left: 14px; background: var(--bg, #eef2f4); border-radius: 9px; padding: 2px; }
.cpoe-tab { font: inherit; font-size: 12px; font-weight: 700; padding: 5px 14px; border: none; border-radius: 7px; background: transparent; color: var(--ink-3, #8a979d); cursor: pointer; }
.cpoe-tab.on { background: #fff; color: var(--navy, #1B2B5B); box-shadow: 0 1px 3px rgba(24,36,96,.12); }
.cpoe-dxsel { font-size: 12px; display: flex; align-items: center; gap: 8px; background: #eefaf0; border: 1px solid #bfe6c8; color: #1d6b3a; font-weight: 600; border-radius: 9px; padding: 7px 11px; margin: 4px 0 7px; }
.cpoe-dxsel b { flex: 0 0 auto; }
.cpoe-dxchips { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 7px; }
.dx-chip { font-size: 10.5px; font-weight: 600; padding: 5px 9px; border-radius: 8px; border: 1px solid #cfe3f5; background: #f4f9fe; color: #1b5fae; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-chip.chart { background: #fafbfc; border-color: var(--line, #e3e9eb); color: var(--ink-2, #4a5a61); }
.dx-chip.on { background: #eefaf0; border-color: #7ec898; color: #1d6b3a; font-weight: 700; }
.cpoe-freq { display: flex; flex-wrap: wrap; gap: 5px; }
.cpoe-right .alg-lbl { margin-top: 2px; }
.cpoe-right { padding: 14px 16px; }
/* reports tab */
.cpoe-reports { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: 56vh; overflow: hidden; }
.rep-list { border-right: 1px solid var(--line-2, #e3e9eb); overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 4px; background: rgba(24,36,96,.02); }
.rep-row { display: flex; align-items: center; gap: 8px; font: inherit; font-size: 12px; text-align: left; padding: 8px 10px; border: 1px solid transparent; border-radius: 9px; background: #fff; cursor: pointer; }
.rep-row:hover { border-color: var(--cyan-text); }
.rep-row.sel { border-color: var(--navy, #1B2B5B); background: #f4f8fd; }
.rep-row.abn { border-left: 3px solid #a02c20; }
.rep-d { font-size: 10.5px; color: var(--ink-3, #8a979d); flex: 0 0 66px; }
.rep-t { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-view { overflow-y: auto; padding: 14px 18px; }
.rep-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.rep-head b { font-size: 15px; } .rep-head span { font-size: 11.5px; color: var(--ink-3, #8a979d); }
.rep-body { font-size: 13px; line-height: 1.6; color: var(--ink-2, #34424a); background: var(--bg, #f7fafb); border: 1px solid var(--line-2, #e3e9eb); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; }
.rep-fu { margin-top: 14px; border-top: 2px solid var(--line-2, #e3e9eb); padding-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.rep-sugg { display: flex; flex-wrap: wrap; gap: 5px; }
.rep-sugg .dx-chip { max-width: 100%; }
.rep-free { font: inherit; font-size: 12.5px; padding: 7px 10px; border: 1px dashed var(--line, #dde3e6); border-radius: 8px; }
.rep-when { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.rep-date { font: inherit; font-size: 11.5px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 7px; }
.loop-src { font-size: 10px; color: #1b5fae; background: #e6f0fb; border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.cpoe-orders { height: 56vh; overflow-y: auto; padding: 12px 16px; }
.ord-list { display: flex; flex-direction: column; gap: 4px; }
.ord-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 7px 10px; background: #fff; border: 1px solid var(--line-2, #e3e9eb); border-radius: 9px; }
.ord-ty { font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--ink-3, #8a979d); flex: 0 0 52px; }
/* facility directory */
.cpoe-opt { font-size: 9.5px; color: var(--ink-3, #8a979d); font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 5px; }
.cpoe-facsugg { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 4px; }
.facd-row { display: flex; align-items: flex-start; gap: 6px; background: #fff; border: 1px solid var(--line-2, #e3e9eb); border-radius: 10px; padding: 9px 12px; margin-bottom: 6px; }
.facd-m { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.facd-m b { font-size: 13px; } .facd-m > span { font-size: 11px; color: var(--ink-3, #8a979d); }
.facd-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.facd-tags i { font-style: normal; font-size: 9.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #e6f0fb; color: #1b5fae; }
.facd-tags i.ins { background: #eefaf0; color: #1d6b3a; }
.facd-form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg, #f7fafb); border: 1px dashed var(--line, #dde3e6); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.facd-form input { font: inherit; font-size: 12.5px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; }
.facd-form [data-ff="ins"], .facd-mods, .facd-form [data-fadd] { grid-column: 1 / -1; }
.facd-mods { display: flex; flex-wrap: wrap; gap: 4px; }
.facd-mods .rxp-sigq-b.on { background: var(--cyan-soft, #e0f5f7); border: 1px solid var(--cyan-text); }
/* right rail cleanup */
.cpoe-right { display: flex; flex-direction: column; gap: 7px; }
.cpoe-right .rxp-ctx-h { margin-top: 6px; }
.cpoe-right .alg-f { margin: 0; }
.cpoe-sech { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.cpoe-sech .rxm-b { background: var(--cyan-soft, #e0f5f7); color: var(--cyan-text); border-radius: 7px; }
.cpoe-opt2 { font-size: 10.5px; color: var(--ink-3, #8a979d); margin: -2px 0 2px; }
.cpoe-right select.rxp-dx, .cpoe-right input { border-radius: 9px; }
.cpoe-ck { padding: 2px 0; }
.cpoe-ck input { accent-color: var(--cyan-text, #1b7f8c); }
.att-tree { margin-top: 2px; }
/* per-study dx */
.row-dxs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 3px; }
.row-dxpill { font: inherit; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eefaf0; border: 1px solid #bfe6c8; color: #1d6b3a; cursor: pointer; }
.row-dxpill:hover { background: #fdecea; border-color: #f0c8c2; color: #a02c20; }
.row-dxadd { font: inherit; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: none; border: 1px dashed var(--line, #cfd8dc); color: var(--ink-3, #8a979d); cursor: pointer; }
.row-dxadd:hover { color: var(--cyan-text); border-color: var(--cyan-text); }
.row-dxhint { font-size: 9.5px; color: var(--ink-3, #a7b3b9); }
.row-dxpick { background: var(--bg, #f5f8f9); border: 1px dashed var(--line, #dde3e6); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.row-dxsugg { display: flex; flex-wrap: wrap; gap: 4px; }
.row-dxctl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.row-dxctl select, .row-dxctl input { font: inherit; font-size: 12px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; }
/* uniform modal resize handles */
.md-rz { position: absolute; z-index: 30; }
.md-rz-e { top: 0; right: -4px; width: 8px; height: 100%; cursor: ew-resize; }
.md-rz-w { top: 0; left: -4px; width: 8px; height: 100%; cursor: ew-resize; }
.md-rz-s { bottom: -4px; left: 0; height: 8px; width: 100%; cursor: ns-resize; }
.md-rz-se { bottom: -3px; right: -3px; width: 16px; height: 16px; cursor: nwse-resize; border-right: 3px solid var(--line, #cfd8dc); border-bottom: 3px solid var(--line, #cfd8dc); border-radius: 0 0 8px 0; }
/* cpoe flexes with the resized card */
.cpoe-card { display: flex; flex-direction: column; height: 700px; max-height: 94vh; }
.cpoe-body { flex: 1 1 auto; height: auto; min-height: 0; }
.cpoe-reports, .cpoe-orders { flex: 1 1 auto; height: auto; min-height: 0; }
/* modern rail */
.cpoe-sec { border-top: 1px solid var(--line-2, #eaeef1); padding-top: 10px; margin-top: 2px; display: flex; flex-direction: column; gap: 6px; }
.cpoe-sec:first-child { border-top: none; padding-top: 0; }
.sec-h { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: var(--ink-3, #90a0a8); display: flex; align-items: center; gap: 6px; }
.sec-hint { font-size: 9px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink-3, #a7b3b9); background: var(--bg, #f0f4f6); border-radius: 999px; padding: 1px 8px; cursor: help; }
.sec-gear { margin-left: auto; background: none !important; }
.sec-gear:hover { color: var(--cyan-text) !important; }
.cpoe-in { font: inherit; font-size: 12.5px; padding: 8px 11px; border: 1px solid var(--line, #dfe6ea); border-radius: 10px; background: #fff; transition: border-color .12s, box-shadow .12s; width: 100%; }
.cpoe-in:focus { outline: none; border-color: var(--cyan-text, #1b7f8c); box-shadow: 0 0 0 3px rgba(27,127,140,.10); }
.cpoe-dxsel { display: flex; align-items: center; gap: 7px; background: #eefaf0; border: 1px solid #cdeacd; color: #1d6b3a; border-radius: 10px; padding: 6px 10px; font-size: 12px; }
.cpoe-dxsel b { font-size: 12.5px; } .cpoe-dxsel span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.seg2 { display: flex; background: var(--bg, #eef2f4); border-radius: 10px; padding: 2px; }
.seg2-b { flex: 1; font: inherit; font-size: 11.5px; font-weight: 700; padding: 6px 0; border: none; border-radius: 8px; background: transparent; color: var(--ink-3, #8a979d); cursor: pointer; }
.seg2-b.on { background: #fff; color: var(--navy, #1B2B5B); box-shadow: 0 1px 3px rgba(24,36,96,.12); }
.seg2-b.stat.on { background: #b00020; color: #fff; }
/* dx target selector + compact roomy cart */
.dx-targets { display: flex; flex-wrap: wrap; gap: 4px; }
.dxt { font: inherit; font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line, #dfe6ea); background: #fff; color: var(--ink-3, #8a979d); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dxt.on { background: var(--navy, #1B2B5B); border-color: var(--navy, #1B2B5B); color: #fff; }
.cpoe-row.tgt { border-color: var(--navy, #1B2B5B); box-shadow: 0 0 0 1px var(--navy, #1B2B5B); }
.cpoe-row { cursor: pointer; padding: 6px 10px; }
.cpoe-row-m b { font-size: 12px; }
.cpoe-row-m span { font-size: 10px; }
.row-dxs { margin-top: 2px; }
.cpoe-cartbox { max-height: 28vh; }
.cpoe-cartbar { padding: 6px 16px 2px; }
.freq-tgl { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 2px 0; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #8a93a6; cursor: pointer; }
.freq-tgl:hover { color: #1B2B5B; }
.freq-tgl .freq-n { background: #eef2f9; border-radius: 8px; padding: 0 6px; font-size: 10px; color: #556; }
.freq-tgl .freq-ar { font-size: 9px; }
.freq-list { display: flex; flex-wrap: wrap; gap: 5px; width: 100%; margin-top: 4px; }
.cpoe-vsplit { cursor: col-resize; background: transparent; border-radius: 3px; position: relative; }
.cpoe-vsplit::after { content: ''; position: absolute; top: 12px; bottom: 12px; left: 2px; width: 2px; border-radius: 2px; background: var(--line, #e3e8f0); transition: background .15s; }
.cpoe-vsplit:hover::after, .cpoe-vsplit.drag::after { background: #1B2B5B; }
.cpoe-venseg { margin: 0 18px 10px; }
.cpoe-venseg .seg2-b { padding: 8px 0; font-size: 12px; }
.cpoe-dxquick { display: flex; flex-wrap: wrap; gap: 4px; }
.cpoe-dxquick .rxp-sigq-b { font-size: 10.5px; padding: 3px 8px; }
/* modern left-panel fields in CPOE modals — match the rail's design language */
.cpoe-left .alg-lbl { font-size: 10px; font-weight: 800; letter-spacing: .7px; color: var(--ink-3, #90a0a8); }
.cpoe-left .alg-f input { font: inherit; font-size: 12.5px; padding: 9px 12px; border: 1px solid var(--line, #dfe6ea); border-radius: 10px; background: #fff; transition: border-color .12s, box-shadow .12s; width: 100%; }
.cpoe-left .alg-f input:focus { outline: none; border-color: #1B2B5B; box-shadow: 0 0 0 3px rgba(27,43,91,.08); }
.cpoe-ftbtn { border: 1px dashed var(--line, #cfd8de); border-radius: 10px; background: #fff; color: var(--ink-2, #4a5560); font-size: 12px; font-weight: 700; padding: 9px 12px; }
.cpoe-ftbtn:hover { border-color: #1B2B5B; color: #1B2B5B; }
.cpoe-dxquick .rxp-sigq-b.rel { background: #eefaf0; border: 1px solid #7ec898; color: #1d6b3a; font-weight: 700; }
.ta-drop .ins-opt.sel { background: #eefaf0; }
.ta-drop .ins-opt.sel .ins-opt-main { color: #1d6b3a; font-weight: 700; }
.ta-ck { display: inline-block; width: 16px; color: #1d6b3a; font-weight: 800; }
.ta-multi-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line, #e3e8f0); padding: 7px 10px; }
.ta-multi-done { width: 100%; font: inherit; font-size: 12px; font-weight: 700; padding: 7px 0; border: none; border-radius: 8px; background: #1B2B5B; color: #fff; cursor: pointer; }
.ta-multi-done:disabled { background: #eef1f6; color: #9aa5b5; cursor: default; }
span.row-dxpill { cursor: default; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
span.row-dxpill:hover { background: #eefaf0; border-color: #bfe6c8; color: #1d6b3a; }
span.row-dxpill button { font: inherit; font-size: 10px; border: none; background: none; color: #6a8f74; cursor: pointer; padding: 0 1px; border-radius: 4px; }
span.row-dxpill button:hover { color: #a02c20; background: #fdecea; }
/* embedded Dx Navigator + problem-list picker in CPOE rails */
.probpick-btn { font: inherit; font-size: 11.5px; font-weight: 700; text-align: left; padding: 8px 11px; border: 1px dashed var(--line, #cfd8de); border-radius: 10px; background: #fff; color: var(--ink-2, #4a5560); cursor: pointer; }
.probpick-btn:hover { border-color: #1B2B5B; color: #1B2B5B; }
.cpoe-right .dxs { gap: 6px; }
.cpoe-right .dxs-bar { flex-wrap: wrap; gap: 6px; }
.cpoe-right .dxs-input { font-size: 12.5px; padding: 8px 11px; border-radius: 10px; }
.cpoe-right .dxs-results, .cpoe-right .dxs-body { max-height: 300px; overflow-y: auto; }
/* compact navigator rows inside the CPOE rail */
.cpoe-right .dx-res { padding: 6px 8px; font-size: 11.5px; }
.cpoe-right .dx-res-code { font-size: 11px; min-width: 52px; }
.cpoe-right .dx-res-desc { font-size: 11.5px; }
.cpoe-right .dxs-sec { font-size: 9.5px; }
.dxq-lbl { font-size: 9.5px; color: var(--ink-3, #90a0a8); letter-spacing: .3px; }
.cpoe-dxquick .rxp-sigq-b { background: #fff; border: 1px dashed #c9d4de; color: #56697a; }
.cpoe-dxquick .rxp-sigq-b:hover { border-color: #1B2B5B; color: #1B2B5B; }
.cpoe-bundles { display: flex; flex-direction: column; gap: 8px; }
.bun-grp { display: flex; flex-direction: column; gap: 4px; }
.bun-row { display: flex; flex-wrap: wrap; gap: 5px; }
/* lab coverage engine */
.cov { font-size: 10px; font-weight: 700; margin-top: 2px; }
.cov.ok { color: #1d6b3a; }
.cov.auto { color: #1b5fae; }
.cov.gap { color: #8a5b0e; }
.cov-abn { font: inherit; font-size: 10px; font-weight: 800; border: 1px solid #ecd690; background: #fdf6e3; color: #8a5b0e; border-radius: 6px; padding: 1px 7px; cursor: pointer; }
.cov-abn:hover { background: #f7e9c4; }
.lastres { font-size: 10px; color: #7a8694; margin-top: 1px; }
.lastres.soon { color: #8a5b0e; font-weight: 700; }
.cpoe-labgaps { display: flex; flex-wrap: wrap; gap: 5px; }
.gap-chip { font: inherit; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid #f0c88a; background: #fff8ec; color: #8a5b0e; cursor: pointer; }
.gap-chip:hover { background: #fdeed2; }
.gap-chip .gap-why { font-weight: 500; color: #a98e58; font-size: 10px; }
/* diagnosis section redesign: attached = slim green-accent rows; suggestions = neutral/amber */
.cpoe-dxchips { display: flex; flex-direction: column; gap: 3px; }
.dxrow { display: flex; align-items: center; gap: 6px; font-size: 11px; padding: 3px 6px 3px 8px; border-left: 3px solid #7ec898; background: #f7fcf8; border-radius: 6px; min-width: 0; }
.dxrow b { color: #1d6b3a; font-size: 10.5px; flex: none; }
.dxrow-n { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #41504a; }
.dxrow button { border: none; background: none; color: #8aa392; cursor: pointer; font-size: 10px; padding: 0 2px; flex: none; }
.dxrow button:hover { color: #a02c20; }
.dx-clearall { margin-left: auto; font-size: 9.5px; font-weight: 600; border: none; background: none; color: #8a93a6; cursor: pointer; text-decoration: underline; }
.dx-clearall:hover { color: #a02c20; }
.cpoe-dxquick .rxp-sigq-b.rel { background: #fff8ec; border: 1px solid #f0c88a; color: #8a5b0e; font-weight: 700; }
/* search gets full width; rank toggle appears only while the navigator is in use */
.cpoe-right .dxs-input { flex: 1 1 100%; }
.cpoe-right .dxs-rank { display: none; }
.cpoe-right .dxs:focus-within .dxs-rank { display: flex; }
/* full-problem-list becomes a compact secondary row */
.probpick-btn { padding: 5px 10px; font-size: 11px; }
/* unified chart-record feed */
.rec-filt { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 0 8px; position: static; background: var(--card, #fff); }   /* never sticky: pinned to the column top it slid behind the fixed patient header in short filters (Notes, Visits) */
.rec-fbtn { font: inherit; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line, #e3e8f0); background: #fff; color: var(--ink-2, #4a5560); cursor: pointer; }
.rec-fbtn.on { background: #1B2B5B; border-color: #1B2B5B; color: #fff; }
.rec-k { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.rec-k-visit { background: #1B2B5B; } .rec-k-doc { background: #8a93a6; } .rec-k-lab { background: #7c4dff; }
.rec-k-imaging { background: #0e8ba8; } .rec-k-med { background: #1d6b3a; } .rec-k-referral { background: #b8860b; } .rec-k-other { background: #c2c9d6; }
.ref-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
/* three-column composer: cart as full-height middle column */
.cpoe-cartbar.colmode { display: flex; flex-direction: column; min-height: 0; border-top: none; padding-top: 0; }
.cpoe-cartbar.colmode .cpoe-cartbox { max-height: none; flex: 1 1 auto; overflow-y: auto; }
.cart-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* uniform collapsible left-column sections */
.lsec-h { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; font: inherit; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: var(--ink-3, #90a0a8); background: none; border: none; border-top: 1px solid var(--line-2, #eaeef1); padding: 8px 0 2px; cursor: pointer; }
.lsec-h:hover .lsec-l { color: #1B2B5B; }
.lsec-h .lsec-ar { font-size: 9px; width: 10px; }
.lsec-h .freq-n { background: #eef2f9; border-radius: 8px; padding: 0 6px; font-size: 10px; color: #556; letter-spacing: 0; }
.cpoe-labfreq { display: block; }
/* chronological record rows: tidy dates, one-line titles, status chips */
#record .rec { display: flex; gap: 10px; align-items: flex-start; }
#record .rdate { flex: 0 0 78px; white-space: nowrap; font-size: 10.5px; color: var(--ink-3, #8a93a6); font-weight: 600; padding-top: 2px; font-variant-numeric: tabular-nums; }
#record .rec-m { flex: 1; min-width: 0; }
#record .rt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-st { display: inline-block; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 1px 7px; border-radius: 999px; background: #eef1f6; color: #66707f; }
.rec-st.ok { background: #eefaf0; color: #1d6b3a; }
.rec-st.pend { background: #fdf6e3; color: #8a5b0e; }
.rec-st.fut { background: #eef4fd; color: #1b3f7a; }
.rec-st-x { font-size: 10px; color: #8a93a6; margin-left: 6px; }
/* visit-note composer */
.nt-card { width: min(1180px, 96vw); }
.nt-doc { overflow-y: auto; padding-right: 6px; }
.nt-ta { resize: vertical; line-height: 1.5; }
.nt-auto { font-size: 11.5px; line-height: 1.55; color: #34404e; background: #f7f9fb; border: 1px solid var(--line-2, #eaeef1); border-radius: 8px; padding: 8px 10px; }
.nt-dim { color: #94a0ad; }
.nt-types { display: flex; flex-wrap: wrap; gap: 5px; }
.nt-type.on { background: #1B2B5B; color: #fff; border-color: #1B2B5B; }
.nt-ap { display: flex; flex-direction: column; gap: 8px; }
.nt-prob { border: 1px solid var(--line, #e3e8f0); border-left: 3px solid #1B2B5B; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.nt-prob-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 12.5px; }
.nt-prob-codes { font-size: 10px; color: #8a93a6; white-space: nowrap; }
.nt-prob-l { font-size: 11px; color: #45525f; }
.nt-planta { font-size: 12px; }
.nt-ptg { display: flex; align-items: center; gap: 6px; font-size: 11px; padding: 3px 0; cursor: pointer; }
.nt-ptg-t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-ptg-hcc { font-size: 8.5px; font-weight: 800; background: #fdf1dc; color: #8a5b0e; border-radius: 6px; padding: 1px 5px; }
.qc-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; font: inherit; font-size: 11px; border: 1px solid var(--line, #e3e8f0); border-radius: 8px; background: #fff; padding: 5px 8px; margin-bottom: 4px; cursor: pointer; }
.qc-chip.on { border-color: #1d6b3a; background: #f4fbf5; }
.qc-chip .qc-last { font-size: 9.5px; color: #8a93a6; }
.nt-act { font-size: 11px; padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vn-signed { background: #eefaf0; color: #1d6b3a; font-size: 10px; font-weight: 800; border-radius: 6px; padding: 2px 8px; }
.vn-draft { background: #fdf6e3; color: #8a5b0e; font-size: 10px; font-weight: 800; border-radius: 6px; padding: 2px 8px; }
/* note composer v2 — adopted live chart sections */
.nt-card { width: min(1280px, 97vw); }
.nt-doc { overflow-y: auto; padding: 4px 10px 20px 2px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.nt-fld { display: flex; flex-direction: column; gap: 4px; }
.nt-ta { resize: vertical; line-height: 1.5; font-size: 12.5px; }
.nt-row { display: flex; gap: 10px; }
.nt-cc { flex: 1; }
.nt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
@media (max-width: 1100px) { .nt-grid2 { grid-template-columns: 1fr; } }
.nt-adopted { margin: 0 !important; box-shadow: 0 1px 4px rgba(24,36,96,.06); }
.nt-adopted .body { max-height: 340px; overflow-y: auto; }
.nt-aphead { display: flex; align-items: baseline; gap: 10px; border-top: 2px solid #1B2B5B; padding-top: 10px; margin-top: 4px; }
.nt-types { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 12px; }
.nt-type { font: inherit; font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line, #dfe6ea); background: #fff; color: var(--ink-2); cursor: pointer; }
.nt-type.on { background: #1B2B5B; color: #fff; border-color: #1B2B5B; }
.nt-actions { display: flex; flex-direction: column; gap: 4px; }
.nt-actbtn { font: inherit; font-size: 11.5px; font-weight: 600; text-align: left; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line, #e3e8f0); background: #fff; cursor: pointer; }
.nt-actbtn:hover { border-color: #1B2B5B; color: #1B2B5B; }
/* note composer v3 — paper document */
.nt-paperwrap { overflow-y: auto; background: #eef1f5; padding: 18px; min-width: 0; }
.nt-paper { background: #fff; max-width: 860px; margin: 0 auto; padding: 34px 44px 40px; border-radius: 4px; box-shadow: 0 2px 14px rgba(24,36,96,.10); display: flex; flex-direction: column; gap: 14px; }
.np-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #1B2B5B; padding-bottom: 10px; }
.np-pt { font-size: 17px; font-weight: 800; color: #14213d; }
.np-meta { font-size: 11.5px; color: #6a7686; margin-top: 2px; }
.np-prac { font-size: 11px; font-weight: 700; color: #1B2B5B; letter-spacing: .5px; }
.np-sec { display: flex; flex-direction: column; gap: 3px; }
.np-h { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: #1B2B5B; display: flex; align-items: baseline; gap: 8px; }
.np-hint { font-size: 9.5px; color: #9aa5b3; text-transform: none; letter-spacing: .2px; font-weight: 500; }
.np-text { font: inherit; font-size: 13px; line-height: 1.6; color: #222b38; border: 1px solid transparent; border-radius: 6px; padding: 2px 6px; margin: 0 -6px; resize: none; overflow: hidden; background: transparent; width: calc(100% + 12px); }
.np-text:hover:not(:read-only) { border-color: #e3e8f0; }
.np-text:focus { outline: none; border-color: #1B2B5B; background: #fbfcfe; }
.np-cc { font-weight: 600; }
.np-line { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12.5px; line-height: 1.6; }
.np-dim { color: #9aa5b3; font-size: 12px; }
.np-vc { display: inline-flex; gap: 5px; font-size: 12.5px; padding: 2px 9px; border-radius: 7px; background: #f4f7fa; border: 1px solid #e6ebf1; }
.np-vc b { color: #5b6878; font-weight: 700; font-size: 11px; }
.np-vc.warn { background: #fdf3f1; border-color: #f0cfc7; }
.np-histline { font-size: 12.5px; line-height: 1.7; color: #2a3442; }
.np-histline b { color: #45536a; font-size: 11px; }
.np-add { font: inherit; font-size: 10px; font-weight: 700; border: 1px dashed #c6d0dc; background: #fff; color: #5b6878; border-radius: 999px; padding: 0 8px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.np-add:hover { border-color: #1B2B5B; color: #1B2B5B; }
.np-alg { font-size: 12px; font-weight: 600; color: #a02c20; background: #fdf0ee; border: 1px solid #f0cfc7; border-radius: 999px; padding: 1px 10px; }
.np-panel { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 2px 0; }
.np-panel-t { font-size: 10px; font-weight: 800; color: #6a7686; margin-right: 3px; }
.np-lab { font-size: 11.5px; padding: 1px 8px; border-radius: 7px; background: #f4f7fa; border: 1px solid #e6ebf1; color: #2a3442; }
.np-lab i { font-style: normal; color: #93a0af; font-size: 10px; margin-left: 2px; }
.np-lab.hi { background: #fdf0ee; border-color: #f0cfc7; } .np-lab.hi b { color: #a02c20; }
.np-lab.lo { background: #eef4fd; border-color: #cfe0f5; } .np-lab.lo b { color: #1b5fae; }
.np-report { font-size: 12px; line-height: 1.55; color: #2a3442; padding: 3px 0; cursor: pointer; border-radius: 6px; }
.np-report:hover { background: #f6f8fb; }
.np-report.abn { color: #7a2018; }
.np-apsec { border-top: 2px solid #1B2B5B; padding-top: 10px; }
.np-aph { font-size: 11px; }
.np-prob { padding: 8px 0 10px; border-bottom: 1px solid #edf0f4; display: flex; flex-direction: column; gap: 5px; }
.np-prob-h { font-size: 13.5px; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.np-prob-n { color: #6a7686; font-weight: 700; }
.np-prob-code { font-size: 11px; color: #6a7686; font-weight: 600; }
.np-hcc { font-size: 9px; font-weight: 800; background: #fdf1dc; color: #8a5b0e; border-radius: 6px; padding: 1px 6px; }
.np-raf { font-size: 9px; font-weight: 800; background: #eef4fd; color: #1b3f7a; border-radius: 6px; padding: 1px 6px; }
.np-prob-row { display: flex; flex-wrap: wrap; gap: 4px; }
.np-trend { font-size: 9.5px; color: #8a5b0e; }
.np-plan { font-size: 12.5px; }
.np-qc { font-size: 11.5px; background: #f4fbf5; border: 1px solid #cfe8d5; color: #1d6b3a; border-radius: 7px; padding: 1px 9px; }
.np-sign { margin-top: 18px; font-size: 11.5px; color: #45536a; }
.np-signline { border-bottom: 1px solid #9aa5b3; width: 260px; height: 26px; margin-bottom: 5px; }
/* v4: structured ROS/PE grids, histories grid, preventive, MEAT, scores */
.np-sysgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
@media (max-width: 1000px) { .np-sysgrid { grid-template-columns: 1fr; } }
.np-sys, .np-pe { display: flex; gap: 8px; align-items: baseline; font-size: 12px; line-height: 1.5; padding: 2px 4px; border-radius: 6px; cursor: pointer; }
.np-pe { cursor: default; }
.np-sys:hover { background: #f4f7fa; }
.np-sys-l { flex: 0 0 108px; font-size: 10.5px; font-weight: 700; color: #5b6878; }
.np-sys-neg { color: #9aa5b3; }
.np-sys-t { color: #7a2018; font-weight: 600; }
.np-sys.pos { background: #fdf6f4; }
.np-pe.pos { background: #fdf9ee; }
.np-pe-t { color: #2a3442; outline: none; flex: 1; }
.np-pe-t:focus { background: #fbfcfe; box-shadow: inset 0 -1px 0 #1B2B5B; }
.np-pegrid { grid-template-columns: 1fr; }
.np-histgrid { display: flex; flex-direction: column; gap: 1px; }
.np-histrow { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.6; }
.np-hist-l { flex: 0 0 108px; font-size: 10.5px; font-weight: 700; color: #5b6878; padding-top: 2px; }
.np-hist-v { flex: 1; color: #2a3442; }
.np-score { font-size: 12px; background: #f2f0fb; border: 1px solid #ddd8f0; color: #4a3f8f; border-radius: 7px; padding: 1px 9px; }
.np-score i { font-style: normal; color: #948cc0; font-size: 10px; }
.np-prevent { display: flex; flex-direction: column; gap: 2px; }
.np-prev { display: flex; gap: 8px; align-items: baseline; font-size: 12px; line-height: 1.5; padding: 2px 6px; border-radius: 6px; }
.np-prev b { font-weight: 700; color: #2a3442; flex: 0 0 auto; }
.np-prev-b { flex: 0 0 64px; font-size: 10px; font-weight: 800; }
.np-prev-e { color: #6a7686; font-size: 11.5px; }
.np-prev.ok .np-prev-b { color: #1d6b3a; }
.np-prev.ready .np-prev-b { color: #1b5fae; }
.np-prev.due .np-prev-b { color: #8a5b0e; }
.np-prev.over { background: #fdf3f1; } .np-prev.over .np-prev-b { color: #a02c20; }
.np-meat { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 6px; }
.np-meat-seg { width: 7px; height: 7px; border-radius: 2px; background: #e3e8f0; display: inline-block; }
.np-meat-seg.on { background: #1d6b3a; }
.np-meat.warn .np-meat-seg.on { background: #b8860b; }
.np-meat-n { font-size: 9px; font-weight: 800; color: #6a7686; margin-left: 2px; }
.np-billed { font-size: 9.5px; font-weight: 700; color: #1d6b3a; background: #eefaf0; border-radius: 6px; padding: 1px 7px; }
.np-notbilled { font-size: 9.5px; font-weight: 700; color: #8a5b0e; background: #fdf6e3; border-radius: 6px; padding: 1px 7px; }
.np-prob-today { display: flex; flex-wrap: wrap; gap: 4px; }
.np-today { font-size: 11px; color: #1b5fae; background: #eef4fd; border: 1px solid #cfe0f5; border-radius: 7px; padding: 1px 8px; }
.np-ap.cols2 { column-count: 2; column-gap: 26px; }
.np-ap.cols2 .np-prob { break-inside: avoid; }
@media (max-width: 1000px) { .np-ap.cols2 { column-count: 1; } }
.np-click { cursor: pointer; }
button.pp-pill, button.np-alg, button.np-score { font: inherit; }
button.pp-pill:hover, button.np-alg:hover { box-shadow: 0 0 0 2px rgba(27,43,91,.12); }
.np-score { cursor: pointer; border: 1px solid #ddd8f0; }
.np-score:hover { box-shadow: 0 0 0 2px rgba(74,63,143,.15); }
.np-prev-acts { margin-left: auto; display: flex; gap: 4px; flex: none; }
.np-prev-act { font: inherit; font-size: 10px; font-weight: 700; border: 1px solid var(--line, #dfe6ea); background: #fff; border-radius: 7px; padding: 1px 8px; cursor: pointer; color: #45536a; }
.np-prev-act:hover { border-color: #1B2B5B; color: #1B2B5B; }
.np-prev-act.primary { background: #1B2B5B; border-color: #1B2B5B; color: #fff; }
.np-prev { flex-wrap: wrap; }
.np-capline { align-items: center; }
.np-cap-l { font-size: 10px; font-weight: 800; color: #8a5b0e; }
.np-cap { font: inherit; font-size: 10.5px; font-weight: 700; border: 1px solid #f0c88a; background: #fff8ec; color: #8a5b0e; border-radius: 999px; padding: 1px 9px; cursor: pointer; }
.np-cap:hover { background: #fdeed2; }
.np-cap:disabled { background: #eefaf0; border-color: #bfe6c8; color: #1d6b3a; }
.np-prob-tools { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.np-ptool { font: inherit; font-size: 10.5px; font-weight: 700; border: 1px solid var(--line, #dfe6ea); background: #fff; border-radius: 7px; padding: 2px 9px; cursor: pointer; color: #45536a; }
.np-ptool:hover { border-color: #1B2B5B; color: #1B2B5B; }
.np-suggout { display: inline-flex; flex-wrap: wrap; gap: 4px; }
/* CC/HPI/ROS section upgrades */
.np-ccquick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.np-chip { font: inherit; font-size: 10.5px; font-weight: 600; border: 1px dashed #c6d0dc; background: #fff; color: #5b6878; border-radius: 999px; padding: 1px 9px; cursor: pointer; }
.np-chip:hover { border-color: #1B2B5B; color: #1B2B5B; }
.np-chip.on { background: #fdf6f4; border: 1px solid #e8b3a8; color: #7a2018; font-weight: 700; }
.np-hpi { display: flex; flex-direction: column; gap: 1px; }
.np-hpiline { display: flex; gap: 6px; align-items: baseline; }
.np-hpitxt { flex: 1; font-size: 13px; line-height: 1.6; color: #222b38; outline: none; border-radius: 4px; padding: 1px 4px; margin: 0 -4px; }
.np-hpitxt:focus { background: #fbfcfe; box-shadow: inset 0 -1px 0 #1B2B5B; }
.np-hpix { border: none; background: none; color: #c2c9d6; cursor: pointer; font-size: 10px; flex: none; }
.np-hpiline:hover .np-hpix { color: #a02c20; }
.np-hpinew { font: inherit; font-size: 12px; border: 1px dashed #c6d0dc; border-radius: 7px; padding: 3px 9px; width: 100%; background: #fff; }
.np-hpinew:focus { outline: none; border-color: #1B2B5B; border-style: solid; }
.np-sysbox.pos { break-inside: avoid; }
.np-rosed { padding: 4px 4px 6px 112px; display: flex; flex-direction: column; gap: 4px; }
.np-rosin { font-size: 11.5px; padding: 4px 9px; }
.np-hb { display: flex; flex-direction: column; gap: 1px; margin-bottom: 3px; }
.np-hb-t { font-weight: 700; }
.np-hb-sub { padding-left: 18px; }
.np-hb-dash { color: #9aa5b3; flex: none; }
.np-hb-subin { font-size: 12px; }
.np-hb-add { color: #1b5fae; font-size: 12px; }
.np-hb-main:hover .np-hb-add { color: #1B2B5B; }
.np-hpirev { background: #f6f4fd; border: 1px solid #e2dcf5; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.np-revsum { font-size: 12px; line-height: 1.6; color: #4a3f8f; }
.np-hpifree { margin-top: 2px; }
.np-rosmode { display: inline-flex; gap: 4px; }
.np-rosmode .np-add.on { background: #1B2B5B; border-color: #1B2B5B; color: #fff; border-style: solid; }
.np-rosbanner { font-size: 12px; color: #1b5fae; background: #eef4fd; border: 1px solid #cfe0f5; border-radius: 7px; padding: 4px 10px; margin-bottom: 4px; }
.np-sys.perhpi, .np-sysbox.perhpi .np-sys { background: #f4f8fd; }
.np-sys-t.hpi { color: #1b5fae; font-weight: 600; font-style: italic; }
.np-chip-hpi { border-style: solid; border-color: #cfe0f5; background: #f4f8fd; color: #1b5fae; }
.np-chip-hpi.on { background: #1b5fae; color: #fff; border-color: #1b5fae; font-weight: 700; }
/* vitals: carry-forward, repeats, trends, inline recording */
.np-vc { font: inherit; cursor: pointer; }
.np-vc:hover { box-shadow: 0 0 0 2px rgba(27,43,91,.12); }
.np-vc.stale { background: #fbfcfd; border-style: dashed; color: #6a7686; }
.np-vc.rpt { background: #eef4fd; border-color: #cfe0f5; }
.np-vc-empty { border-style: dashed; color: #9aa5b3; }
.np-vwhen { font-style: normal; font-size: 9px; color: #9aa5b3; margin-left: 4px; }
.np-vtrend { font-size: 10px; font-weight: 800; margin-left: 3px; }
.np-vtrend.up { color: #a02c20; } .np-vtrend.dn { color: #1d6b3a; }
.np-vited { display: flex; gap: 6px; align-items: center; width: 100%; margin-top: 5px; }
.np-vited-l { font-size: 11px; font-weight: 700; color: #45536a; }
.np-vin { width: 74px; font-size: 12.5px; padding: 4px 8px; }
.np-vslash { color: #9aa5b3; font-weight: 700; }
.np-vsave { padding: 4px 12px; font-size: 12px; }
.np-vord { font-size: 8.5px; font-weight: 800; background: #1B2B5B; color: #fff; border-radius: 5px; padding: 1px 5px; margin-right: 2px; }
.np-vc.rpt .np-vord { background: #1b5fae; }
.np-vtag { font-style: italic; font-size: 10px; color: #1b5fae; margin-left: 4px; }
.np-vtags { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.np-vadd { font: inherit; font-size: 11px; font-weight: 800; border: 1px dashed #c6d0dc; background: #fff; color: #5b6878; border-radius: 6px; padding: 1px 6px; cursor: pointer; margin-right: 6px; }
.np-vadd:hover { border-color: #1B2B5B; color: #1B2B5B; }
.np-pe-ctl { display: inline-flex; gap: 2px; flex: none; opacity: 0; }
.np-pe:hover .np-pe-ctl { opacity: 1; }
.np-pe-cl { font-weight: 700; }
.np-peadd { display: flex; gap: 6px; margin-top: 3px; }
.np-pelbl { flex: 0 0 190px; }
.np-peprev { background: #f6f4fd; border: 1px solid #e2dcf5; border-radius: 8px; padding: 6px 10px; }
.np-pecarry { font-style: normal; font-size: 9px; color: #1b5fae; background: #eef4fd; border-radius: 5px; padding: 1px 6px; flex: none; }
.np-opt { font: inherit; font-size: 11.5px; font-weight: 600; color: #1b5fae; background: #eef4fd; border: 1px solid #cfe0f5; border-radius: 6px; padding: 0 6px; cursor: pointer; margin: 0 1px; }
.np-opt:hover { background: #dcebfb; border-color: #1b5fae; }
.np-optmenu .ins-opt-main { font-size: 12px; }
.np-embed { border: 1px solid var(--line-2, #eaeef1); border-radius: 8px; padding: 6px 8px; background: #fdfefe; }
.np-embed .dg-sys-h { position: sticky; top: -6px; background: #fdfefe; z-index: 1; }
.np-embed-ai { border: 1px solid #e2dcf5; background: #f6f4fd; border-radius: 8px; padding: 8px 10px; margin-top: 4px; font-size: 12px; }

.np-collapse { font: inherit; font-size: 14px; border: none; background: none; color: #5b6878; cursor: pointer; padding: 2px 6px 2px 0; width: 26px; line-height: 1; }
.np-collapse:hover { color: #1B2B5B; }
.np-sec.np-collapsed > *:not(.np-h) { display: none; }
.np-sec.np-collapsed .np-h { opacity: .75; }
.np-h-toggle { cursor: pointer; user-select: none; padding: 3px 0; margin: -3px 0; border-radius: 6px; }
.np-h-toggle:hover { background: #f4f7fa; }
.med-viewseg { display: flex; gap: 0; margin: 2px 0 6px; background: #eef1f5; border-radius: 8px; padding: 2px; width: fit-content; }
.med-view-b { font: inherit; font-size: 10.5px; font-weight: 700; border: none; background: transparent; color: #5b6878; padding: 3px 12px; border-radius: 6px; cursor: pointer; }
.med-view-b.on { background: #fff; color: #1B2B5B; box-shadow: 0 1px 3px rgba(24,36,96,.12); }
/* A/P workspace mounts + reminders embed on the paper */
.np-prob-click { cursor: pointer; border-radius: 6px; }
.np-prob-click:hover { background: #f4f7fa; }
.np-prob-tgl { margin-left: auto; font-size: 10px; font-weight: 700; color: #1b5fae; }
.np-prob-prev { font-size: 12px; color: #45525f; line-height: 1.5; cursor: pointer; padding-left: 22px; }
.np-prob-prev:hover { color: #1B2B5B; }
.np-apw { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 4px 10px; border-left: 3px solid #e3e8f0; margin-left: 6px; }
.np-apw .pa-input { font-size: 12px; }
.np-apw .pd-ap, .np-apw .pa-ap { font-size: 12.5px; }
.np-remembed { border: 1px solid var(--line-2, #eaeef1); border-radius: 8px; padding: 6px 8px; background: #fdfefe; }
.np-remembed .rem-sum { display: none; }
.np-prob-name { cursor: pointer; border-bottom: 1px dashed transparent; }
.np-prob-name:hover { color: #1b5fae; border-bottom-color: #1b5fae; }
.np-prob-code[data-apedit] { cursor: pointer; }
.np-prob-code[data-apedit]:hover { color: #1b5fae; }
button.np-prob-tgl { font: inherit; border: 1px solid #cfe0f5; background: #f4f8fd; border-radius: 7px; padding: 1px 9px; cursor: pointer; }
button.np-prob-tgl:hover { border-color: #1b5fae; }
/* billing & coding */
.np-bill { display: flex; flex-direction: column; gap: 6px; }
.np-bill-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; }
.np-bill-l { flex: 0 0 108px; font-size: 10.5px; font-weight: 700; color: #5b6878; }
.np-em { font: inherit; font-size: 12px; font-weight: 700; border-radius: 8px; padding: 3px 12px; }
.np-em.on { background: #1B2B5B; color: #fff; }
.np-em.sug { border: 1px dashed #1b5fae; background: #f4f8fd; color: #1b5fae; cursor: pointer; }
.np-em.sug:hover { background: #e3effc; }
.np-emin { font-size: 12px; padding: 3px 8px; }
.np-dxo { font-size: 11.5px; background: #f4f7fa; border: 1px solid #e6ebf1; border-radius: 6px; padding: 1px 8px; margin-right: 3px; }
.np-bill-dx { display: inline-flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.np-qc-b { font-style: normal; font-size: 9px; font-weight: 800; border-radius: 5px; padding: 1px 6px; margin-left: 4px; background: #eef1f6; color: #66707f; }
.np-qc-b.ok { background: #eefaf0; color: #1d6b3a; }
.np-qc-b.rep { background: #eef4fd; color: #1b3f7a; }
.np-billedbig { font-size: 13px; font-weight: 800; color: #1d6b3a; }
.np-billbtn { font-size: 12px; padding: 4px 14px; }
/* note tab strip + full view */
.note-tabstrip { display: flex; gap: 5px; align-items: center; padding: 6px 18px 0; flex-wrap: wrap; }
.nt-tab { font: inherit; font-size: 11.5px; font-weight: 700; border: 1px solid var(--line, #dfe6ea); border-bottom: none; background: #f4f7fa; color: #45536a; border-radius: 8px 8px 0 0; padding: 5px 12px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; }
.nt-tab.on { background: #fff; color: #1B2B5B; box-shadow: 0 -2px 6px rgba(24,36,96,.08); }
.nt-tab-x { color: #9aa5b3; font-size: 10px; } .nt-tab-x:hover { color: #a02c20; }
.nt-tab-new { border-style: dashed; background: #fff; color: #1b5fae; }
.nt-tab-back { margin-left: auto; border-radius: 8px; background: #1B2B5B; color: #fff; border-color: #1B2B5B; }
.note-fullview { padding: 0 18px 18px; }
.note-fullview .nt-card { width: 100%; max-width: none; height: calc(100vh - 170px); box-shadow: none; border: 1px solid var(--line, #e3e8f0); }
.nt-tochart { font-size: 11px; padding: 3px 10px; margin-right: 6px; }
.nt-ptglist { max-height: 220px; overflow-y: auto; }

/* ── note full-view: 3 independently-scrolling work columns, A&P widest ── */
#noteFull { padding: 10px 14px 14px; background: #e8eaee; }
#noteFull .nt-paperwrap { padding: 0; background: transparent; height: 100%; overflow: hidden; }
#noteFull .nt-paper { max-width: none; height: 100%; display: flex; flex-direction: column; box-shadow: 0 1px 4px rgba(20,30,50,.12); padding-bottom: 0; }
#noteFull .modal-foot { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #e3e6ec; z-index: 5; }
.npf-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 27fr 33fr 40fr; gap: 0; margin-top: 6px; }
.npf-col { min-width: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 26px 16px; border-right: 1px solid #edf0f5; }
.npf-col:first-child { padding-left: 0; }
.npf-col:last-child { border-right: 0; padding-right: 0; background: #fbfcfe; border-left: 1px solid #e8ecf3; margin-left: -1px; padding-left: 16px; border-radius: 0 0 8px 0; }
.npf-col::-webkit-scrollbar { width: 8px; }
.npf-col::-webkit-scrollbar-thumb { background: #d7dce6; border-radius: 8px; }
.nt-fullmode .np-sec { break-inside: avoid; }
@media (max-width: 1200px) { .npf-cols { grid-template-columns: 1fr 1fr; } .npf-col:last-child { grid-column: 1 / -1; border-left: 0; } }

/* ── encounter details popover ── */
.np-meta-click { cursor: pointer; border-radius: 6px; padding: 1px 5px; margin-left: -5px; transition: background .12s; }
.np-meta-click:hover { background: #eef3fb; color: #2b5fb8; }
.np-encpop { padding: 10px 12px; min-width: 230px; }
.np-encpop label { display: block; font-size: 10px; font-weight: 700; color: #7b8494; text-transform: uppercase; letter-spacing: .04em; margin: 6px 0 3px; }
.np-encpop input, .np-encpop select { width: 100%; font-size: 12px; padding: 5px 7px; border: 1px solid #d4d9e3; border-radius: 7px; background: #fff; }
.np-encpop .cal-btn { margin-top: 9px; width: 100%; }

/* ── note rail redesign ── */
.nt-rail { display: flex; flex-direction: column; gap: 10px; }
.nt-rail .cpoe-sec { background: #fff; border: 1px solid #e5e8ef; border-radius: 12px; padding: 10px 12px; }
.nt-rail .nt-rh { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #64708a; margin-bottom: 8px; user-select: none; }
.nt-rail .cpoe-sec.np-collapsed > *:not(.nt-rh) { display: none; }
.nt-rail .cpoe-sec.np-collapsed .nt-rh { margin-bottom: 0; }
.nt-pt-tools { margin-left: auto; display: flex; gap: 4px; }
.nt-actgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.nt-actbtn { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: #2f3a52; background: #f7f8fb; border: 1px solid #e3e7ef; border-radius: 9px; padding: 7px 9px; cursor: pointer; text-align: left; transition: all .12s; }
.nt-actbtn:hover { background: #eef3fd; border-color: #b9cdf2; color: #2b5fb8; }
.nt-ai { width: 18px; text-align: center; font-size: 13px; flex: none; }
.nt-billcard { display: flex; flex-direction: column; gap: 7px; }
.nt-bc-top { display: flex; align-items: center; gap: 9px; }
.nt-bc-em { font-size: 21px; font-weight: 800; letter-spacing: .01em; color: #1d2740; font-variant-numeric: tabular-nums; }
.nt-bc-em.dim { color: #b6bdcb; }
.nt-bc-pill { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #f0f2f7; color: #6a7488; }
.nt-bc-pill.ok { background: #e2f5e8; color: #1d7a3e; }
.nt-bc-pill.rep { background: #e7eefc; color: #2b5fb8; }
.nt-bc-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.nt-bc-b { font-size: 10px; font-weight: 600; color: #56617a; background: #f3f5f9; border-radius: 6px; padding: 2px 7px; }
.nt-bc-bill { width: 100%; margin-top: 2px; }
.nt-ptglist { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; }
.nt-ptg-code { font-size: 10px; font-weight: 700; color: #2b5fb8; font-variant-numeric: tabular-nums; flex: none; min-width: 42px; }
.nt-activity { font-size: 11px; }

/* full-tab mode: one slim toolbar; header, letterhead, and rail column disappear */
.nt-fullmode .modal-head, .nt-fullmode .np-head, .nt-fullmode .cpoe-right { display: none; }
.npf-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 4px 8px 0; border-bottom: 1px solid #e8ecf3; }
.npf-bar .np-meta { margin: 0; font-size: 13px; font-weight: 700; color: #24304a; }
.npf-bar .nt-actgrid { display: flex; grid-template-columns: none; gap: 6px; margin-left: auto; }
.npf-bar .nt-actbtn { padding: 4px 9px; font-size: 11px; border-radius: 8px; }
.npf-bar .nt-actbtn .nt-ai { width: auto; font-size: 12px; }
.npf-bar .cpoe-pt { margin: 0; }
.npf-bar .modal-x { position: static; margin-left: 2px; }

/* full-tab: reclaim the hidden rail's grid track + density pass */
.nt-fullmode .cpoe-body { grid-template-columns: minmax(0, 1fr) !important; }
.nt-fullmode .cpoe-vsplit { display: none; }
.nt-fullmode .nt-paper { padding-left: 20px; padding-right: 20px; }
.npf-bar .np-meta { white-space: nowrap; }
.npf-cols { grid-template-columns: 29fr 34fr 37fr; }
.rec-note { cursor: pointer; border-radius: 8px; transition: background .12s; }
.rec-note:hover { background: #eef3fb; }

/* full-tab: kill dead space, keep the action foot on screen, no duplicate order buttons */
#noteFull { padding: 6px 12px 6px; }
#noteFull .nt-card, .note-fullview .nt-card { height: 100%; max-height: none; }
.nt-fullmode .cpoe-body { height: auto; max-height: none; flex: 1 1 auto; min-height: 0; }
.nt-fullmode .modal-foot { flex: none; }
.nt-fullmode .nt-paper { padding-top: 0; padding-bottom: 0; }
.nt-fullmode .np-sign { display: none; }
.npf-bar { padding: 5px 4px 5px 0; }
.npf-bar [data-act="rx"], .npf-bar [data-act="lab"], .npf-bar [data-act="img"], .npf-bar [data-act="ref"] { display: none; }

/* rail billing section + editable code chips */
.nt-railbillsec .np-sec { border: 0; padding: 0; }
.nt-railbillsec .np-h { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #64708a; border: 0; padding: 0; margin-bottom: 8px; }
.nt-railbillsec .np-bill-row { flex-direction: column; align-items: stretch; gap: 4px; }
.np-x { font-style: normal; cursor: pointer; color: #b0392e; font-size: 10px; padding: 0 2px; border-radius: 4px; opacity: .55; }
.np-x:hover { opacity: 1; background: #fdecea; }

/* Elation-style claim lines in Billing & coding */
.nb-items { display: flex; flex-direction: column; gap: 8px; }
.nb-item { border: 1px solid #e2e6ee; border-left: 4px solid #2b4d8f; border-radius: 9px; background: #fff; overflow: hidden; }
.nb-ihead { display: flex; align-items: center; gap: 5px; padding: 6px 8px; background: #f7f8fb; border-bottom: 1px solid #eef0f5; flex-wrap: wrap; }
.nb-inum { font-size: 12px; font-weight: 800; color: #2b4d8f; min-width: 14px; }
.nb-cpt { width: 68px; font-weight: 700; font-size: 12px; }
.nb-cpt-sug { font-size: 10.5px; padding: 3px 7px; }
.nb-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; color: #939cae; }
.nb-mod { width: 30px; font-size: 11px; text-align: center; }
.nb-qty { width: 34px; font-size: 11px; text-align: center; }
.nb-dxn { font-size: 10px; font-weight: 700; background: #e8eefb; color: #2b4d8f; border-radius: 999px; padding: 2px 8px; margin-left: auto; }
.nb-del { margin-left: 2px; }
.nb-dxs { padding: 4px 8px 7px; }
.nb-dxrow { display: flex; align-items: center; gap: 7px; font-size: 11.5px; padding: 3px 2px; border-bottom: 1px dashed #f0f2f6; }
.nb-dxrow:last-of-type { border-bottom: 0; }
.nb-dxi { font-size: 10px; color: #98a1b3; min-width: 10px; }
.nb-dxd { color: #5b6478; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-raf { font-size: 10px; font-weight: 700; color: #b26a08; font-variant-numeric: tabular-nums; }
.nb-adddx { position: relative; margin-top: 4px; }
.nb-adddx input { width: 100%; font-size: 11px; border-style: dashed; }
.nb-dxdrop { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; background: #fff; border: 1px solid #d8dde8; border-radius: 8px; box-shadow: 0 8px 22px rgba(20,30,60,.14); max-height: 220px; overflow-y: auto; }
.nb-dxopt { display: flex; gap: 6px; align-items: center; font-size: 11.5px; padding: 6px 9px; cursor: pointer; }
.nb-dxopt:hover { background: #eef3fd; }
.nb-addline { width: 100%; border: 1px dashed #c6cede; background: #fbfcfe; color: #4a5876; border-radius: 9px; padding: 7px; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.nb-addline:hover { background: #eef3fd; border-color: #9db6e4; }
.nb-claimrow { margin-top: 8px; }

/* discard-draft confirm */
.np-discard { max-width: 420px; padding: 18px 20px; }
.np-disc-h { font-size: 17px; font-weight: 800; color: #a52a1d; margin-bottom: 8px; }
.np-disc-b { font-size: 13px; color: #444e63; margin-bottom: 14px; }
.np-disc-f { display: flex; gap: 8px; }
.np-danger-btn, .cal-btn.np-danger-btn { background: #b0392e; border-color: #b0392e; }
.cal-btn.np-danger { color: #b0392e; }

/* Requiring Action strip (Elation) */
.req-act { border: 1.5px solid #f0c27a; background: #fffaf2; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
.req-h { font-size: 12px; font-weight: 800; color: #9a4a12; margin-bottom: 5px; display: flex; align-items: center; gap: 7px; }
.req-n { background: #f6d78a; color: #6d3b0a; border-radius: 6px; font-size: 11px; padding: 0 7px; }
.req-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.req-row:hover { background: #fdf1dc; }
.req-m { flex: 1; min-width: 0; }
.req-t { font-size: 12.5px; font-weight: 700; color: #2b4d8f; }
.req-s { font-size: 11px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-go { flex: none; font-size: 11px; font-weight: 700; color: #2b5fb8; border: 1px solid #cdd9ee; background: #fff; border-radius: 8px; padding: 4px 10px; margin-right: 2px; }
.req-row:hover .req-go { background: #e7eefc; border-color: #9db6e4; }
.req-btns { display: flex; gap: 6px; flex: none; margin-right: 2px; }

/* chronological-record row Actions */
.rec .rec-act { visibility: hidden; margin-left: auto; margin-right: 4px; flex: none; font-size: 10.5px; font-weight: 600; color: #7684a0; background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 3px 8px; cursor: pointer; }
.rec:hover .rec-act { visibility: visible; }
.rec .rec-act:hover { background: #eef3fd; border-color: #c3d3ef; color: #2b5fb8; }
.rec-menu { padding: 4px; }
.rec-mi { font-size: 12px; padding: 7px 10px; border-radius: 7px; cursor: pointer; color: #2c3852; }
.rec-mi:hover { background: #eef3fd; }
.rec-mi.danger { color: #b0392e; }
.rec-mi.danger:hover { background: #fdecea; }

/* note timer + claim details */
.np-timer { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: #1d7a3e; background: #e9f7ee; border-radius: 999px; padding: 2px 9px; margin-left: 10px; font-variant-numeric: tabular-nums; }
.np-timer.paused { color: #8a6d1a; background: #fdf5dd; }
.nb-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 8px; margin-bottom: 8px; align-items: end; }
.nb-meta label { display: flex; flex-direction: column; gap: 2px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #8b94a8; }
.nb-meta input, .nb-meta select { font-size: 11px; }
.nb-time { grid-column: span 2; justify-self: start; font-size: 11px; font-weight: 700; color: #1d7a3e; }
.nb-dxdrop-h { font-size: 10px; color: #8b94a8; padding: 5px 9px 3px; border-bottom: 1px solid #eef0f5; }

.rem-await { font-size: 10.5px; font-weight: 700; color: #1d7a3e; background: #e9f7ee; border-radius: 7px; padding: 3px 9px; }

/* feed content keeps clear of the card's rounded edges */
#record { padding: 6px 12px 12px !important; }

/* full-tab = its own full-bleed workspace, not a parked popup */
#noteFull { padding: 0; background: #fff; }
#noteFull .nt-card { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; border: 0; border-radius: 0; box-shadow: none; }
#noteFull .nt-paperwrap { background: #fff; }
#noteFull .nt-paper { box-shadow: none; border-radius: 0; padding-left: 0; padding-right: 0; }
.nt-fullmode .npf-bar { padding: 9px 16px; border-bottom: 1.5px solid #e4e8f0; background: #fbfcfe; }
.nt-fullmode .npf-cols { margin-top: 0; }
.npf-col:first-child { padding-left: 16px; }
.npf-col:last-child { padding-right: 16px; border-radius: 0; }
.nt-fullmode .modal-foot { padding: 8px 16px; box-shadow: 0 -2px 10px rgba(20,30,60,.05); }

/* visit scribe panel */
.nt-scribepanel { position: fixed; right: 18px; bottom: 18px; width: 400px; max-height: 76vh; display: flex; flex-direction: column; background: #fff; border: 1px solid #dbe1ec; border-radius: 14px; box-shadow: 0 14px 40px rgba(15,25,55,.22); z-index: 1200; overflow: hidden; }
.nt-scribepanel.rec { border-color: #d98b8b; box-shadow: 0 14px 40px rgba(160,30,30,.25); }
.sp-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 12.5px; font-weight: 800; color: #24304a; background: #f7f8fb; border-bottom: 1px solid #e8ecf3; }
.sp-st { font-size: 10px; font-weight: 700; color: #64708a; background: #eef0f5; border-radius: 999px; padding: 2px 8px; }
.nt-scribepanel.rec .sp-st { color: #a52a1d; background: #fdecea; }
.sp-body { padding: 10px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.sp-tx { width: 100%; font-size: 12px; line-height: 1.5; }
.sp-btns { display: flex; gap: 7px; }
.sp-btns .cal-btn { flex: 1; }
.sp-digest { display: flex; flex-direction: column; gap: 7px; border-top: 1px dashed #dfe4ee; padding-top: 8px; }
.sp-sec { font-size: 11.5px; }
.sp-cklbl { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.sp-prev { margin: 3px 0 0 20px; color: #4a5570; font-size: 11px; line-height: 1.5; max-height: 110px; overflow-y: auto; }
.sp-apply { margin-top: 4px; }

.med-dupflag { font-size: 8.5px; font-weight: 800; letter-spacing: .03em; background: #fdecea; color: #a5301f; border-radius: 6px; padding: 1px 6px; margin-left: 5px; cursor: help; }

/* pending-sign top-bar button + review modal */
.wp-pendbtn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #7a4d0d; background: #fdf1dc; border: 1.5px solid #eec97e; border-radius: 10px; padding: 7px 13px; margin-right: 8px; cursor: pointer; }
.wp-pendbtn:hover { background: #fbe7c2; }
.wp-pendbtn b { background: #b9770e; color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; }
.pnd-sec { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #64708a; margin-top: 6px; }
.pnd-row { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid #e8ecf3; border-radius: 9px; font-size: 12.5px; }
.pnd-k { flex: none; font-size: 10px; font-weight: 800; border-radius: 6px; padding: 2px 8px; background: #e7eefc; color: #2b4d8f; text-transform: uppercase; }
.pnd-k.order { background: #e2f5e8; color: #1d7a3e; }
.pnd-t { flex: 1; min-width: 0; }
.pnd-r { display: block; font-size: 11px; color: #6b7280; }

/* ── P1: Brief band ── */
.np-briefsec { border: 0 !important; padding: 0 !important; }
.np-brief { display: flex; flex-direction: column; gap: 6px; background: linear-gradient(180deg,#f6f9ff,#fdfeff); border: 1px solid #e2e9f6; border-radius: 12px; padding: 8px 6px 8px; }
.np-bf-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 10px 6px; border-bottom: 1px solid #e8edf6; font-size: 11.5px; color: #2b3550; }
.np-bf-last { flex: 1 1 320px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-bf-last b { color: #5b6a8c; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; margin-right: 6px; }
.np-bf-last i { font-style: normal; color: #6b7590; }
.np-bf-vit { white-space: nowrap; }
.np-bf-vit b { color: #1B2B5B; }
.np-bf-tr { font-style: normal; font-weight: 700; font-size: 10.5px; color: #6b7590; }
.np-bf-tr.dn { color: #1d6b3a; }
.np-bf-tr.up { color: #b3541e; }
.np-bf-hpi { margin-left: auto; }
.np-bf-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
.np-bf-col { padding: 0 12px; border-right: 1px solid #e8edf6; min-width: 0; }
.np-bf-col:last-child { border-right: 0; }
.np-bf-h { font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #7b87a0; margin-bottom: 4px; }
.np-bf-l { font-size: 11.5px; color: #2b3550; padding: 4px 4px 4px 0; border-top: 1px dashed #edf0f6; display: flex; align-items: flex-start; gap: 6px; border-radius: 6px; }
.np-bf-l:hover { background: rgba(24,36,96,.035); }
.np-bf-m { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; }
.np-bf-l:first-of-type { border-top: 0; }
.np-bf-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.np-bf-s { font-size: 10.5px; color: #7b87a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-bf-l.stale .np-bf-t, .np-bf-l.resulted .np-bf-t { color: #8a5b0e; }
.np-bf-l.due .np-bf-t b { color: #1B2B5B; }
.np-bf-l.done { opacity: .55; }
.np-bf-a { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.np-bf-prim { font: inherit; font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid #d5dcea; background: #fff; color: #1B2B5B; cursor: pointer; white-space: nowrap; }
.np-bf-prim:hover { background: #1B2B5B; color: #fff; border-color: #1B2B5B; }
.np-bf-prim:disabled { background: #eefaf0; color: #1d6b3a; border-color: #bfe3c9; cursor: default; }
.np-bf-more { font: inherit; font-size: 13px; line-height: 1; width: 22px; height: 20px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: #8a93a6; cursor: pointer; opacity: .55; }
.np-bf-l:hover .np-bf-more, .np-bf-more:focus { opacity: 1; }
.np-bf-more:hover { background: #fff; border-color: #d5dcea; color: #1B2B5B; }
.np-bf-more:disabled { opacity: 1; color: #1d6b3a; background: #eefaf0; border-color: #bfe3c9; font-size: 10px; width: auto; padding: 0 7px; }
.np-bf-menu { position: fixed; z-index: 12000; min-width: 150px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px -10px rgba(15,25,55,.35), 0 4px 12px rgba(15,25,55,.10); padding: 5px; display: flex; flex-direction: column; }
.np-bf-menu button { font: inherit; font-size: 12.5px; font-weight: 600; text-align: left; padding: 7px 11px; border: 0; background: transparent; border-radius: 8px; color: var(--ink); cursor: pointer; }
.np-bf-menu button:hover { background: rgba(24,36,96,.06); color: var(--navy); }
.np-bf-flag { font-style: normal; font-weight: 700; color: #b3541e; font-size: 10px; }
.np-bf-count { font-size: 10px; color: #8a93a6; margin-top: 4px; }
.np-bf-count .np-add { font-size: 10px; }

/* ── P1: compact preventive rows ── */
.np-prevsum { font-size: 10.5px; font-weight: 600; color: #5b6a8c; text-transform: none; letter-spacing: 0; }
.np-pvrow { display: flex; align-items: center; gap: 8px; font-size: 11.5px; padding: 3px 2px; border-bottom: 1px dashed #f0f2f6; }
.np-pv-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-pv-b { flex: none; font-style: normal; font-size: 9px; font-weight: 800; border-radius: 6px; padding: 1px 7px; }
.np-pv-b.od { background: #fdecea; color: #a5301f; } .np-pv-b.due { background: #fdf1dc; color: #8a5b0e; }
.np-pv-b.rep { background: #e7eefc; color: #2b4d8f; } .np-pv-b.bill { background: #e9f7ee; color: #1d7a3e; }

/* ── P1: note-skin med rows ── */
.med-item.mednote { padding: 3px 6px; }
.med-item.mednote .med-t { font-size: 12px; }
.mednote-sig { font-weight: 400; color: #6b7280; font-size: 11px; margin-left: 5px; }

/* ── P1: chart drawer ── */
.nt-cdrawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 46%); background: #fff; border-left: 1.5px solid #dbe1ec; box-shadow: -16px 0 44px rgba(15,25,55,.16); z-index: 60; display: flex; flex-direction: column; border-radius: 0 12px 12px 0; }
.cd-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; font-weight: 800; border-bottom: 1px solid #eef0f5; }
.cd-tabs { display: flex; gap: 5px; margin-left: auto; }
.cd-tab { font-size: 11px; font-weight: 700; color: #5b6a8c; background: #f3f5f9; border: 0; border-radius: 7px; padding: 4px 10px; cursor: pointer; }
.cd-tab.on { background: #1d3a7a; color: #fff; }
.cd-h .modal-x { position: static; }
.cd-body { flex: 1; overflow-y: auto; padding: 10px 14px; }

/* ── P2: plan tokens, pending lines, groups ── */
.np-prob-plan { cursor: default; }
.np-pl { font-size: 12px; line-height: 1.5; color: #33405e; padding: 1px 0; }
.np-pl.pend { background: #e9f7ee; border-left: 3px solid #35a45c; border-radius: 4px; padding: 2px 6px; display: flex; align-items: center; gap: 8px; }
.np-pl.pend .np-x { margin-left: auto; }
.np-tokmed { color: #1d5fc0; font-weight: 600; border-bottom: 1.5px dotted #9db6e4; cursor: pointer; }
.np-tokmed:hover { background: #eef3fd; border-radius: 3px; }
.np-tokorder { font-size: 9.5px; font-weight: 800; color: #fff; background: #2b5fb8; border: 0; border-radius: 6px; padding: 1px 7px; margin-left: 5px; cursor: pointer; vertical-align: 1px; }
.np-tokorder:disabled { background: #35a45c; }
.np-medpop { padding: 6px; }
.np-medpop-h { font-size: 11.5px; font-weight: 800; padding: 4px 8px 6px; border-bottom: 1px solid #eef0f5; margin-bottom: 3px; }
.np-group { border: 1.5px solid #b9cdf2 !important; background: linear-gradient(180deg,#f7faff,#fff); border-radius: 11px; padding: 9px 12px; margin-bottom: 9px; }
.np-group-t { font-size: 10px; font-weight: 800; letter-spacing: .05em; color: #2b5fb8; text-transform: uppercase; }
.np-group-mem { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.np-group-code { font-style: normal; font-size: 9.5px; color: #5b6a8c; }
.np-gplan { margin-top: 6px; }
.np-groupbar { display: flex; align-items: center; gap: 10px; font-size: 12px; background: #eef3fd; border: 1px solid #b9cdf2; border-radius: 10px; padding: 8px 12px; margin-top: 6px; }
.np-gck { accent-color: #2b5fb8; }

/* ── P3: billing chip + sign sheet ── */
.nt-billchip { display: flex; align-items: center; gap: 9px; background: #fff; border: 1.5px solid #cdd9ee; border-radius: 11px; padding: 8px 12px; cursor: pointer; }
.nt-billchip:hover { border-color: #9db6e4; background: #f7faff; }
.nt-bc2-em { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; color: #1d2740; }
.nt-bc2-em.dim { color: #b6bdcb; }
.nt-bc2-meta { font-size: 10.5px; color: #5b6a8c; }
.nt-bc2-go { margin-left: auto; font-size: 11px; font-weight: 800; color: #2b5fb8; }
.npf-bar .nt-billchip { padding: 4px 10px; margin-left: 8px; }
.npf-bar .nt-bc2-em { font-size: 15px; }
.nt-sheetov { z-index: 400; align-items: flex-end; }
.nt-sheet { width: min(1280px, 96vw); max-height: 92vh; margin: 0 auto; background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -18px 70px rgba(10,18,40,.45); display: flex; flex-direction: column; overflow: hidden; }
.ss-grab { flex: none; width: 44px; height: 5px; border-radius: 3px; background: #dde2ec; margin: 10px auto 0; }
.ss-head { flex: none; display: flex; align-items: center; gap: 14px; padding: 12px 24px 10px; border-bottom: 1.5px solid #eef0f5; }
.ss-head h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.ss-pt { font-size: 12px; color: #5b6a8c; }
.ss-head .modal-x { position: static; margin-left: auto; }
.ss-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 46fr 30fr 24fr; overflow: hidden; }
.ss-pane { overflow-y: auto; padding: 14px 20px; border-right: 1px solid #eef0f5; }
.ss-pane:last-child { border-right: 0; background: #fbfcfe; }
.ss-ph { display: flex; align-items: center; gap: 10px; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #7b87a0; margin-bottom: 9px; }
.ss-time { font-size: 11px; font-weight: 700; color: #1d7a3e; text-transform: none; letter-spacing: 0; }
.ss-nudge { font-size: 11px; font-weight: 700; color: #2b5fb8; background: #eef3fd; border: 1px solid #b9cdf2; border-radius: 8px; padding: 3px 10px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.ss-act { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid #e8ecf3; border-radius: 10px; margin-bottom: 6px; font-size: 12px; }
.ss-act i { display: block; font-style: normal; font-size: 10.5px; color: #8a93a6; }
.ss-k { flex: none; font-size: 9px; font-weight: 800; border-radius: 6px; padding: 2px 7px; text-transform: uppercase; }
.ss-k.med { background: #fdf5dd; color: #8a6d1a; } .ss-k.ord { background: #e2f5e8; color: #1d7a3e; }
.ss-chk { display: flex; gap: 9px; align-items: flex-start; padding: 7px 10px; border-radius: 10px; margin-bottom: 6px; font-size: 12px; }
.ss-chk.ok { background: #f2faf4; } .ss-chk.warn { background: #fdf6ec; border: 1px solid #f0d9a8; }
.ss-chk b { display: block; font-size: 12px; }
.ss-chk i { display: block; font-style: normal; font-size: 11px; color: #5b6a8c; }
.ss-foot { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-top: 1.5px solid #eef0f5; }
.ss-sum { font-size: 12px; color: #5b6a8c; }
.ss-sum b { color: #1d2740; }
.ss-sign { font-size: 14px; padding: 11px 26px; border-radius: 12px; box-shadow: 0 6px 18px rgba(29,58,122,.28); }
.nt-sheetov .np-sec { border: 0; padding: 0; }

/* ── P4: ⌘K palette + huddle ── */
.wp-cmdk { position: fixed; inset: 0; background: rgba(15,22,40,.35); backdrop-filter: blur(2px); z-index: 500; display: flex; justify-content: center; align-items: flex-start; padding-top: 14vh; }
.ck-box { width: min(560px, 92vw); background: #fff; border-radius: 16px; box-shadow: 0 24px 80px rgba(10,18,40,.4); overflow: hidden; }
.ck-in { width: 100%; border: 0; outline: none; font-size: 15px; padding: 15px 18px; border-bottom: 1.5px solid #eef0f5; font-family: inherit; }
.ck-list { max-height: 340px; overflow-y: auto; padding: 6px; }
.ck-item { font-size: 13px; padding: 9px 12px; border-radius: 9px; cursor: pointer; color: #2c3852; }
.ck-item.on, .ck-item:hover { background: #eef3fd; }
.ck-hint { font-size: 10px; color: #98a1b3; padding: 6px 14px 9px; border-top: 1px solid #f2f4f8; }
.hud-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 4px; border-bottom: 1px solid #f0f2f6; }
.hud-t { flex: none; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 44px; color: #2b4d8f; }
.hud-m { flex: 1; min-width: 0; }
.hud-brief { font-size: 11.5px; color: #5b6a8c; margin-top: 3px; }

.ss-pa { color: #8a5b0e !important; }
.wp-docmetrics { font-size: 11.5px; color: #5b6a8c; background: #f3f6fc; border: 1px solid #e2e9f6; border-radius: 9px; padding: 5px 12px; margin-top: 6px; display: inline-block; }
.wp-docmetrics b { color: #1d2740; }

.np-bf-due { margin: 2px 5px 2px 0 !important; }

/* ═══════════ NOTE VISUAL PARITY WITH design_mock.html ═══════════ */
/* section headers = quiet uppercase eyebrows, actions right-aligned */
.nt-paper .np-sec { border: 0; padding: 0 0 4px; margin: 0; }
.nt-paper .np-h { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #5b6a8c; border: 0; padding: 2px 0 6px; margin: 0; }
.nt-paper .np-h .np-hint { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 10.5px; color: #98a1b3; }
.nt-paper .np-h .np-add { margin-left: auto; text-transform: none; letter-spacing: 0; }
.nt-paper .np-h .np-add ~ .np-add { margin-left: 0; }
.npf-col > .np-sec { padding-bottom: 12px; border-bottom: 1px solid #f0f2f6; }
.npf-col > .np-sec:last-child { border-bottom: 0; }

/* meds note rows: number · name — sig · chips · quick actions */
.med-item.mednote { display: flex; align-items: center; gap: 7px; padding: 3.5px 2px; border-bottom: 1px dashed #f0f2f6; border-radius: 0; }
.med-item.mednote:last-of-type { border-bottom: 0; }
.med-item.mednote .med-num { font-size: 10px; color: #98a1b3; min-width: 15px; }
.med-item.mednote .med-t { font-size: 12px; font-weight: 500; color: #1d2740; }
.mn-acts { margin-left: auto; display: flex; gap: 4px; opacity: .65; }
.med-item.mednote:hover .mn-acts { opacity: 1; }
.mn-act { font-size: 9.5px; font-weight: 700; color: #2b5fb8; background: #fff; border: 1px solid #cdd9ee; border-radius: 7px; padding: 2px 8px; cursor: pointer; }
.mn-act:hover { background: #eef3fd; }
.mn-act.ok { color: #1d7a3e; border-color: #b7e0c4; }
.mn-act:disabled { color: #1d7a3e; border-color: transparent; background: transparent; }

/* new-results rows with deltas */
.np-lab { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px 2px 0; }
.np-lab b { font-variant-numeric: tabular-nums; }
.np-lab.hi b { color: #b0392e; } .np-lab.lo b { color: #b3541e; }
.np-dl { font-style: normal; font-size: 10.5px; font-weight: 700; }
.np-dl.up { color: #b3541e; } .np-dl.down { color: #1d7a3e; } .np-dl.same { color: #98a1b3; }

/* PE summary line */
.np-peh { flex-wrap: wrap; }
.np-pesum { flex: 1 1 100%; order: 3; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11.5px; color: #5b6a8c; line-height: 1.5; }
.np-pesum b { color: #1d2740; font-weight: 700; }
.np-pesum-n { color: #98a1b3; }
.np-peh2 { margin-top: 4px !important; }

/* ═══ A&P cards — the mock's centerpiece ═══ */
.np-ap { gap: 9px !important; }
.np-prob { background: #fff; border: 1px solid #e5e9f1; border-radius: 11px; padding: 10px 13px; margin: 0 0 9px; box-shadow: 0 1px 2px rgba(20,30,60,.03); }
.np-prob-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; border: 0; padding: 0; }
.np-prob-n { font-size: 11px; color: #98a1b3; font-weight: 700; }
.np-prob-name { font-size: 13px; font-weight: 700; color: #1d2740; letter-spacing: -.005em; cursor: pointer; }
.np-prob-name:hover { color: #2b5fb8; }
.np-prob-code { font-size: 10.5px; font-weight: 700; color: #2b5fb8; cursor: pointer; }
.np-hcc { font-size: 8.5px; font-weight: 800; background: #fdf1dc; color: #8a5b0e; border-radius: 6px; padding: 1.5px 6px; }
.np-meat-seg { width: 8px; height: 8px; border-radius: 2px; background: #e3e7ef; display: inline-block; margin-right: 1.5px; }
.np-meat-seg.on { background: #35a45c; }
.np-billed { font-size: 9px; font-weight: 800; background: #e9f7ee; color: #1d7a3e; border-radius: 999px; padding: 2px 8px; }
.np-notbilled { font-size: 9px; font-weight: 800; background: #eef3fd; color: #2b4d8f; border-radius: 999px; padding: 2px 8px; }
.np-prob-tgl { margin-left: auto; font-size: 10px; font-weight: 700; color: #7684a0; background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 2px 8px; cursor: pointer; }
.np-prob-tgl:hover { color: #2b5fb8; background: #eef3fd; }
.np-prob-prev { margin-top: 5px; border: 0; padding: 0; background: transparent; }
.np-pl { font-size: 12px; line-height: 1.55; color: #33405e; }
.np-prob-today { margin-top: 5px; }
.np-today { font-size: 10.5px; color: #1d7a3e; background: #f2faf4; border-radius: 6px; padding: 2px 8px; margin-right: 4px; display: inline-block; }

/* combined assessment card */
.np-group { border: 1.5px solid #b9cdf2 !important; background: linear-gradient(180deg,#f7faff,#fff) !important; box-shadow: 0 1px 3px rgba(43,95,184,.07); }
.np-gplan { border: 0; background: transparent; padding: 2px 0; font-size: 12px; line-height: 1.55; color: #33405e; }
.np-gplan:focus { background: #fff; border: 1px solid #cdd9ee; border-radius: 8px; padding: 6px 8px; }

/* HPI + ROS quiet density */
.np-hpi b, .np-hpi .np-hpi-topic { font-size: 12.5px; font-weight: 700; color: #1d2740; }
.nt-paper .np-text { font-size: 12px; line-height: 1.55; }

.npf-briefwide { padding: 0 16px 8px !important; }
.np-prob-plan.clamped { max-height: 118px; overflow: hidden; position: relative; }
.np-prob-plan.clamped::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: linear-gradient(transparent, #fff); }
.np-group .np-prob-plan.clamped::after { background: linear-gradient(transparent, #fbfdff); }
.np-plmore { font-size: 10px; font-weight: 700; color: #2b5fb8; background: transparent; border: 0; padding: 2px 0; cursor: pointer; }

/* the sheet is not a .modal-card — re-enable its pointer events explicitly */
.nt-sheetov { pointer-events: auto; }
.nt-sheet { pointer-events: auto; }

/* ═══ Apple A&P: assessment prose · labeled micro-rows · HM chips · action bullets ═══ */
.np-passess { font-size: 12.5px; line-height: 1.55; color: #2b3550; margin: 4px 0 7px; }
.np-plr { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; border-top: 1px dashed #f0f2f6; }
.np-plr-l { flex: none; width: 76px; font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #98a1b3; padding-top: 2px; }
.np-plr-c { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.5; color: #3a465f; }
.np-plchg { font-size: 11.5px; color: #3a465f; padding: 1px 0; }
.np-hmwrap { display: flex; flex-wrap: wrap; gap: 4px; }
.np-hmchip { font-size: 10px; font-weight: 700; border-radius: 7px; padding: 2px 8px; background: #f3f5f9; color: #4a5876; cursor: default; }
.np-hmchip.done { background: #e9f7ee; color: #1d7a3e; }
.np-hmchip.due { background: #fdf1dc; color: #8a5b0e; }
.np-plbuls { margin-top: 7px; border-top: 1px dashed #f0f2f6; padding-top: 6px; }
.np-plbul { display: flex; gap: 7px; font-size: 12px; line-height: 1.55; color: #1f2b47; padding: 1.5px 0; align-items: baseline; }
.np-plbul .np-plb-dot { color: #98a1b3; flex: none; }
.np-plbul.pend { background: #e9f7ee; border-left: 3px solid #35a45c; border-radius: 4px; padding: 3px 6px; }
.np-plbul.pend .np-x { margin-left: auto; }
.np-prob-plan.clamped { max-height: 138px; }

.wp-undotoast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 64px; display: flex; align-items: center; gap: 14px; background: #1d2740; color: #fff; font-size: 13px; font-weight: 600; border-radius: 12px; padding: 10px 16px; box-shadow: 0 10px 30px rgba(10,18,40,.35); z-index: 900; }
.wp-undotoast button { font-size: 12px; font-weight: 800; color: #8fb4ff; background: transparent; border: 0; cursor: pointer; }
.wp-undotoast button:hover { color: #fff; }

.cal-autherr { padding: 40px 20px; text-align: center; font-size: 13px; color: #5b6a8c; line-height: 2; }

/* billing worklist */
.bw-sum { font-size: 12.5px; color: #5b6a8c; margin: 6px 0 14px; }
.bw-sec { font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #7b87a0; margin: 14px 0 7px; }
.bw-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e5e9f1; border-radius: 11px; padding: 10px 14px; margin-bottom: 7px; }
.bw-row.done { opacity: .72; }
.bw-em { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 58px; }
.bw-m { flex: 1; min-width: 0; font-size: 13px; }
.bw-meta { display: block; font-size: 11px; color: #8a93a6; }
.bw-age { font-style: normal; font-weight: 700; color: #a5301f; }
.bw-pill { font-size: 10px; font-weight: 800; border-radius: 999px; padding: 3px 10px; }
.bw-pill.ok { background: #e9f7ee; color: #1d7a3e; }

.hud-nav { display: flex; align-items: center; gap: 7px; padding: 0 4px 8px; }

/* ── Practice Reports view ── */
.rp-kpis{display:flex;gap:12px;flex-wrap:wrap;margin:14px 0 6px}
.rp-kpi{background:var(--card,#fff);border:1px solid var(--line,#e5e7eb);border-radius:12px;padding:12px 18px;min-width:118px;display:flex;flex-direction:column;gap:2px}
.rp-kpi b{font-size:22px;font-weight:700;letter-spacing:-.02em}
.rp-kpi span{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--mut,#6b7280)}
.rp-mrow{display:flex;align-items:center;gap:12px;padding:9px 12px;border-bottom:1px solid var(--line,#eef0f3);font-size:13px;text-align:left}
.rp-kpis,.rp-exports{text-align:left}
.rp-mname{text-align:left}
.rp-mrow:hover{background:var(--hov,#f8fafc)}
.rp-code{font-weight:700;min-width:44px;font-variant-numeric:tabular-nums}
.rp-mname{flex:1;color:var(--txt,#111827)}
.rp-frac{color:var(--mut,#6b7280);min-width:90px;text-align:right;font-variant-numeric:tabular-nums}
.rp-rate{font-weight:600;min-width:44px;text-align:right;font-variant-numeric:tabular-nums}
.rp-star{font-size:11px;font-weight:700;border-radius:999px;padding:2px 9px;min-width:64px;text-align:center}
.rp-star.ok{background:#dcfce7;color:#166534}.rp-star.mid{background:#fef9c3;color:#854d0e}.rp-star.low{background:#fee2e2;color:#991b1b}
.rp-thr{font-size:11px;color:var(--mut,#9ca3af);min-width:120px;text-align:right;font-variant-numeric:tabular-nums}
.rp-exports{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:8px}
.rp-note{font-size:12px;color:var(--mut,#6b7280)}

/* ── Settings → Practice Info ── */
.pp-card{max-width:900px}
.set-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px 14px;margin:10px 0 18px;text-align:left}
.set-fld{display:flex;flex-direction:column;gap:4px}
.set-fld.wide{grid-column:span 2}
.set-fld span{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--mut,#6b7280);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.set-fld input{border:1px solid var(--line,#d1d5db);border-radius:8px;padding:8px 10px;font-size:13px;background:var(--card,#fff);width:100%;min-width:0}
.set-fld input:focus{outline:2px solid var(--acc,#2563eb);outline-offset:-1px;border-color:transparent}
/* Practice Info: a blank identity field is visibly "not set" (never silently a default) */
.set-fld-unset input{border-style:dashed;border-color:#f0b4a8;background:#fff8f6}
.set-fld-unset input::placeholder{color:#b42318;font-style:italic}
.set-unset{text-transform:none;letter-spacing:0;font-style:italic;color:#b42318}
.set-unset-banner{color:#b42318;background:#fff3f0;border:1px solid #f0b4a8;border-radius:8px;padding:8px 10px}
.set-sec-h.sub{margin-top:14px}
.set-sec-h.sub h3{font-size:13px;font-weight:700;letter-spacing:-.01em}

/* calendar provider filter */
.cal-provsel{border:1px solid var(--line,#d1d5db);border-radius:8px;padding:4px 8px;font-size:12px;background:var(--card,#fff);cursor:pointer}

/* ── Results Inbox (batch review) ── */
.ri-card{width:min(860px,94vw);max-height:84vh;display:flex;flex-direction:column}
.ri-head{display:flex;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid var(--line,#e5e7eb)}
.ri-head h2{font-size:16px;font-weight:700;letter-spacing:-.02em;margin:0}
.ri-n{font-size:12px;font-weight:600;color:var(--acc,#2563eb);background:var(--acc-soft,#eff6ff);border-radius:999px;padding:2px 10px}
.ri-keys{margin-left:auto;font-size:11px;color:var(--mut,#9ca3af)}
.ri-list{overflow-y:auto;padding:6px 8px;flex:1}
.ri-row{display:flex;gap:12px;align-items:flex-start;padding:10px 12px;border-radius:10px;border:1px solid transparent;cursor:default}
.ri-row.sel{background:var(--hov,#f1f5f9);border-color:var(--line,#e2e8f0)}
.ri-row.stat .ri-t em.ri-stat{color:var(--danger,#dc2626);font-style:normal;font-weight:700}
.ri-ic{margin-top:2px;color:var(--mut,#6b7280)}
.ri-main{flex:1;min-width:0}
.ri-t{font-size:13px}
.ri-sum{font-size:12px;color:var(--ink-2,#374151);margin-top:2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ri-meta{font-size:11px;color:var(--mut,#9ca3af);margin-top:2px}
.ri-acts{display:flex;gap:6px;flex-shrink:0;align-items:center}

/* ── Tablet/phone responsive pass ── */
@media (max-width: 980px) {
  .topbar { gap: 10px; padding: 0 12px; flex-wrap: nowrap; }
  .topbar > * { min-width: 0; }
  .topnav { overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { padding: 8px 9px; font-size: 12.5px; white-space: nowrap; }
  .topbar .btn-ghost { font-size: 0; gap: 0; padding: 8px; }
  .topbar .btn-ghost::first-letter { font-size: 15px; } /* keep the emoji glyph */
  .chart { padding: 12px 12px 40px; }
  .subhead { padding: 7px 12px; }
  .subhead-main, .doctools-row { overflow-x: auto; scrollbar-width: none; }
  .subhead-main::-webkit-scrollbar, .doctools-row::-webkit-scrollbar { display: none; }
  .subhead-main > *, .doctools-row > * { flex-shrink: 0; }
  .set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-thr { display: none; }
  .rp-mrow { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .usermenu-btn .who { display: none; }
  .brand .logo { height: 22px; max-width: 96px; object-fit: contain; object-position: left; }
  .brand { gap: 6px; flex-shrink: 0; }
  .topbar { gap: 8px; }
  .bw-row { flex-wrap: wrap; row-gap: 6px; }
  .bw-m { flex: 1 1 55%; }
  .bw-m .bw-meta { white-space: normal; }
  .bw-row .cal-btn, .bw-row .bw-pill { margin-left: auto; }
  .set-grid { grid-template-columns: 1fr; }
  .set-fld.wide { grid-column: auto; }
  .rp-kpis { gap: 8px; }
  .rp-kpi { min-width: 96px; padding: 10px 12px; }
  .ri-card { width: 96vw; }
  .ri-row { flex-wrap: wrap; }
  .ri-acts { width: 100%; justify-content: flex-end; }
}


/* Chart toolbar tool modals: compose surfaces need an opaque ground */
.tool-card{background:rgba(255,255,255,.97) !important}
.tool-card .fld-in,.tool-card .np-text{background:#fff;border:1px solid var(--line,#d1d5db);border-radius:8px;padding:8px 10px;font-size:13px}
.tool-card .np-text{line-height:1.55}
.tool-card .ord-sec{margin-top:10px}

/* A&P per-card remove (not addressed today) */
.np-apx-rm{opacity:.45;cursor:pointer;padding:2px 6px;border-radius:6px;font-style:normal;font-size:11px}
.np-apx-rm:hover{opacity:1;background:rgba(220,38,38,.08);color:#dc2626}

/* ══════════ Operations Autopilot ══════════ */
.ops-wrap{text-align:left;max-width:1500px;margin:0 auto;padding:0 8px}
.ops-strip{display:flex;gap:10px;align-items:stretch;flex-wrap:wrap;margin:6px 0 14px}
.ops-k{background:var(--card,#fff);border:1px solid var(--line,#e5e7eb);border-radius:12px;padding:10px 16px;min-width:120px;display:flex;flex-direction:column;gap:2px}
.ops-k b{font-size:24px;font-weight:700;letter-spacing:-.02em;line-height:1.1}
.ops-k span{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--mut,#6b7280)}
.ops-k.warn b{color:#b45309}.ops-k.bad b{color:#dc2626}.ops-k.ok b{color:#15803d}
.ops-run{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:6px}
.ops-last{font-size:11px;color:var(--mut,#6b7280)}
.ops-main{display:grid;grid-template-columns:var(--ops-l,300px) 12px minmax(0,1fr);gap:6px;align-items:stretch;height:calc(100vh - 178px);min-height:420px}
.ops-tiles{display:flex;flex-direction:column;gap:10px;overflow-y:auto;overscroll-behavior:contain;padding:2px 4px 12px 2px;scrollbar-width:thin}
.ops-grip{cursor:col-resize;border-radius:6px;position:relative}
.ops-grip::after{content:"";position:absolute;top:50%;left:4px;width:4px;height:44px;margin-top:-22px;border-radius:4px;background:var(--line,#d1d5db);transition:background .12s}
.ops-grip:hover::after{background:var(--acc,#1B2B5B)}
.ops-work{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.ops-tile{all:unset;box-sizing:border-box;display:block;width:100%;cursor:pointer;background:var(--card,#fff);border:1.5px solid var(--line,#e5e7eb);border-radius:16px;padding:14px 16px;transition:transform .12s,box-shadow .12s,border-color .12s}
.ops-tile:hover{transform:translateY(-1px);box-shadow:0 8px 22px -10px rgba(15,25,55,.25)}
.ops-tile.on{border-color:var(--acc,#1B2B5B);box-shadow:0 0 0 3px rgba(27,43,91,.12)}
.ops-tile.hot{border-left:5px solid #dc2626}
.ops-tile-all{background:linear-gradient(135deg,#1B2B5B,#2a4080);color:#fff;border-color:transparent}
.ops-tile-all .ops-tile-h span,.ops-tile-all .ops-tile-n span{color:rgba(255,255,255,.8)}
.ops-tile-h{display:flex;align-items:center;gap:8px;font-weight:700;font-size:14px;letter-spacing:-.01em}
.ops-tile-h i,.ops-tile-h svg{width:18px;height:18px;flex-shrink:0}
.ops-auton{margin-left:auto;font-style:normal;font-size:10px;font-weight:700;border:1px solid currentColor;border-radius:6px;padding:1px 5px;opacity:.55}
.ops-tile-n{display:flex;align-items:baseline;gap:8px;margin-top:6px}
.ops-tile-n b{font-size:30px;font-weight:800;letter-spacing:-.03em;line-height:1}
.ops-tile-n span{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--mut,#6b7280)}
.ops-tile-s{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.ops-pill{font-size:11px;font-weight:600;border-radius:999px;padding:2px 9px;background:#fef3c7;color:#92400e}
.ops-pill.bad{background:#fee2e2;color:#991b1b}.ops-pill.quiet{background:#f1f5f9;color:#475569}
.ops-work{background:var(--card,#fff);border:1px solid var(--line,#e5e7eb);border-radius:16px;padding:14px 16px;min-height:400px}
.ops-work-h{display:flex;align-items:baseline;gap:12px;margin-bottom:10px;flex-wrap:wrap}
.ops-tools{margin-left:auto;display:flex;gap:6px}
.wp-opsbrief a{margin-left:8px;font-weight:600}
.wp-opsbrief b.bad{color:#dc2626}
.cpoe-sug{margin-top:4px}
.cpoe-sugrow{all:unset;display:flex;justify-content:space-between;gap:10px;width:100%;box-sizing:border-box;cursor:pointer;padding:6px 10px;border:1px solid var(--line,#e5e7eb);border-radius:8px;margin-bottom:4px;font-size:12px}
.cpoe-sugrow:hover{background:var(--hov,#f8fafc);border-color:var(--acc,#1B2B5B)}
.cpoe-sugrow span{color:var(--mut,#6b7280);text-align:right}

/* ═══════════════════════════════════════════════════════════════════════════
   CALM v2 — the approved visual direction (Sep 4 2026): warm off-white ground,
   solid white cards with hairline borders, one navy primary, red only for
   danger/past-SLA, green only for verified. Applied at the TOKEN layer so every
   screen inherits it; the glass blur is retired. Loaded last on purpose.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --font: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Helvetica, Arial, sans-serif;
  --ink: #1a1a18; --ink-1: #1a1a18; --ink-2: #4b4a46; --ink-3: #6b6a66;
  --line: #e6e4df; --line-2: #efeeea;
  --glass: #ffffff; --glass-strong: #ffffff; --glass-soft: #ffffff; --glass-border: #e6e4df;
  --blur: none;
  --brand-grad: var(--navy); --navy-grad: var(--navy);
  --accent: var(--navy); --cyan-text: var(--navy); --cyan-deep: var(--navy);
  --danger: #c2410c; --danger-text: #b03a0a; --danger-bg: rgba(194, 65, 12, .08); --danger-border: rgba(194, 65, 12, .25);
  --ok: #1f7a4d; --ok-text: #1f7a4d; --ok-bg: rgba(31, 122, 77, .08); --ok-border: rgba(31, 122, 77, .25);
  --warn: #b45309; --warn-text: #a04a06; --warn-bg: rgba(180, 83, 9, .08); --warn-border: rgba(180, 83, 9, .25);
  --info-text: var(--navy); --info-bg: rgba(30, 46, 96, .07); --info-border: rgba(30, 46, 96, .18);
  --shadow: 0 1px 2px rgba(26, 26, 24, .04), 0 6px 20px -8px rgba(26, 26, 24, .08);
  --shadow-md: 0 8px 24px -10px rgba(26, 26, 24, .14);
  --shadow-lg: 0 24px 56px -20px rgba(26, 26, 24, .28);
  --focus-ring: 0 0 0 3px rgba(30, 46, 96, .22);
  --r-card: 16px; --r-ctl: 10px;
  --card: #ffffff; --hov: #fafaf8; --mut: #6b6a66; --acc: var(--navy); --acc-soft: rgba(30, 46, 96, .07);
}
body { background: #f7f7f5; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.topbar, .subhead { background: #ffffff; box-shadow: none; border-bottom: 1px solid var(--line); }
.card, .modal-card, .rp-kpi, .ops-k, .ops-tile, .ops-work, .ig-card, .set-sec-card, .bw-row, .tool-card {
  background: #ffffff; border: 1px solid var(--line); box-shadow: none; backdrop-filter: none;
}
.card:hover { box-shadow: var(--shadow); }
.modal-card { box-shadow: var(--shadow-lg); border-radius: 16px; }
.btn-primary, .cal-btn.primary, .ord-btn.ok, .ops-tile-all { background: var(--navy); color: #fff; border-color: transparent; box-shadow: none; }
.btn-primary:hover, .cal-btn.primary:hover { background: #172448; filter: none; box-shadow: none; }
.cal-btn, .btn-ghost, .ord-btn, .np-add, .med-view-b, .ot-tab, .set-tab { background: #ffffff; border: 1px solid var(--line); color: var(--ink); backdrop-filter: none; box-shadow: none; font-weight: 500; }
.cal-btn:hover, .btn-ghost:hover, .ord-btn:hover { background: var(--hov); border-color: #cfcdc7; box-shadow: none; }
.ord-btn.on { color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-border); }
/* active / selected = the WellPlus light blue, everywhere */
.set-tab.active, .ot-tab.active, .med-view-b.on, .ops-stage.on, .lq-measure.on { background: var(--acc-soft); color: var(--navy); border-color: transparent; }
.topnav a { white-space: nowrap; }
.topnav a.active { background: var(--acc-soft); color: var(--navy); }
.topnav a.active::after { display: none; }
/* status: tinted text + dot, not filled chips */
.ops-pill { background: transparent; color: var(--ink-3); padding: 0; border-radius: 0; font-weight: 500; }
.ops-pill.bad { background: transparent; color: var(--danger); }
.ops-pill.quiet { background: transparent; color: var(--ink-3); }
.ops-tile.hot { border-left: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--danger); }
.ops-tile.on { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.ops-tile-all { color: #fff; }
.ops-tile-all .ops-tile-h span, .ops-tile-all .ops-tile-n span { color: rgba(255, 255, 255, .78); }
.ops-row.late { border-left: none; padding-left: 10px; }
.ops-row.late .ops-who::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); margin-right: 2px; vertical-align: middle; }
.ops-k.warn b { color: var(--ink); } .ops-k.ok b { color: var(--ink); } .ops-k.bad b { color: var(--danger); }
.ops-stage.on { background: #f0efec; border-color: transparent; }
.ops-strip, .ops-k { border: none; padding-left: 0; }
.ops-k { background: transparent; }
.ops-k b { font-size: 30px; letter-spacing: -.03em; color: var(--ink); }
.rp-star.ok { background: var(--ok-bg); color: var(--ok-text); } .rp-star.mid { background: var(--warn-bg); color: var(--warn-text); } .rp-star.low { background: var(--danger-bg); color: var(--danger-text); }
.ig-st.ok { background: var(--ok-bg); color: var(--ok-text); } .ig-st.warn { background: var(--warn-bg); color: var(--warn-text); } .ig-st.bad { background: var(--danger-bg); color: var(--danger-text); } .ig-st.info { background: var(--info-bg); color: var(--info-text); }
.wp-docmetrics, .wp-opsbrief { background: #ffffff; border: 1px solid var(--line); color: var(--ink-2); }
.bw-sec, .ops-sub, .ops-last, .ig-meta, .rp-thr { color: var(--ink-3); }
h1, h2, h3 { letter-spacing: -.02em; color: var(--ink); }
input, select, textarea, .fld-in, .np-text, .cpoe-in, .dxs-input { background: #ffffff; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy); outline-offset: -1px; border-color: transparent; }
::selection { background: rgba(30, 46, 96, .14); }
body::before { display: none; }   /* the brand mesh is retired with the glass */
.cal-hour { background-image:
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(26, 26, 24, .09) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(25% - 0.5px), rgba(26, 26, 24, .045) 25%, transparent calc(25% + 0.5px)),
    linear-gradient(to bottom, transparent calc(75% - 0.5px), rgba(26, 26, 24, .045) 75%, transparent calc(75% + 0.5px)); }
.cal-hour:hover { background-color: var(--hov); }
#genericBody { padding: 14px 24px 40px; text-align: left; }
.cal-btn.quiet { border-color: transparent; color: var(--ink-3); }
/* Call card */
.cc-card { max-width: 640px !important; }
.cc-top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.cc-phone { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--navy); text-decoration: none; }
.cc-meta { font-size: 12.5px; color: var(--ink-3); }
.cc-script { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.cc-script p { margin: 0; padding: 12px 14px; border-radius: 12px; background: #f7f7f5; font-size: 14px; line-height: 1.55; }
.cc-out { display: flex; flex-direction: column; gap: 8px; }
.cc-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.cc-slots { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.cc-day { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
.cc-day b { min-width: 110px; font-weight: 600; }
.cc-slot { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 9px; font-size: 12px; cursor: pointer; }
.cc-slot i { font-style: normal; color: var(--ink-3); margin-left: 4px; }
.cc-slot:hover { border-color: var(--navy); }
/* Home care reminders: measure chips (the rings became filters) */
.lq-measures { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 0 12px; }
.lq-measure { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 1px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; min-width: 70px; }
.lq-measure b { font-size: 12.5px; } .lq-measure span { font-size: 11px; color: var(--ink-3); }
.lq-measure.on { background: #f0efec; border-color: transparent; }
/* Flow cards (fax / records / review / PA) */
.fx-card { max-width: 820px !important; }
/* the fax / requisition window is tall: the document gets the room, the controls stay put */
.modal-overlay > .modal-card.fx-card{width:min(1240px,96vw)!important;max-width:none!important;display:flex!important;flex-direction:column!important;max-height:92vh;overflow:hidden!important}
.modal-overlay > .modal-card.fx-card > .modal-head{flex-shrink:0}
.modal-overlay > .modal-card.fx-card > .modal-body{flex:1 1 auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding-bottom:10px}
/* two panels like the rest of the EMR: controls left, the document full height on the right */
.fx-grid{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:340px 1fr;gap:16px}
.fx-left{min-height:0;overflow-y:auto;padding-right:4px;display:flex;flex-direction:column}
.fx-left .od-title{font-size:15px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.fx-left .fx-row{flex-direction:column;align-items:stretch;gap:8px}.fx-left .fx-row .set-fld{width:100%!important;flex:none!important}
.fx-left .fx-row .cal-btn{width:100%;justify-content:center}
.fx-left .od-note{font-size:12px}
.fx-left .fx-att{border-bottom:0;flex-direction:column;align-items:stretch;gap:6px}.fx-left .fx-att-list{gap:5px}
.fx-right{min-height:0;display:flex;flex-direction:column}
.fx-doc-h{display:flex;justify-content:space-between;align-items:baseline;font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);padding:2px 2px 6px}.fx-doc-hint{font-weight:500;letter-spacing:0;text-transform:none;font-size:11px}
.fx-card .fx-preview{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;margin-top:0;font-size:14px;line-height:1.55;background:#fff}
.fx-card .fx-preview > div{max-width:none!important;font-size:14px!important}
@media (max-width:900px){.fx-grid{grid-template-columns:1fr}.fx-right{min-height:50vh}}
.modal-overlay > .modal-card.fx-card > .modal-foot{flex-shrink:0}
.vx-ws-b > .modal-overlay > .modal-card.fx-card{max-height:none}
.fx-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 10px 0; }
.fx-row .set-fld input { width: 100%; box-sizing: border-box; }
.fx-preview { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; max-height: 46vh; overflow-y: auto; background: #fff; }
.fx-details { margin-top: 10px; font-size: 12.5px; }
.fx-pre { white-space: pre-wrap; font-family: var(--font); font-size: 12px; line-height: 1.5; background: #f7f7f5; border-radius: 10px; padding: 12px; max-height: 40vh; overflow-y: auto; }
/* Care-gap rows: closure spec + Record result options */
.ops-row-c { font-size: 12px; color: var(--ink-3); margin-top: 3px; line-height: 1.45; }
.ops-row-c b { color: var(--ink-2); font-weight: 600; }
.gr-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.gr-opt { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.gr-opt b { font-size: 13px; } .gr-opt span { font-size: 11.5px; color: var(--ink-3); }
.gr-opt.on { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
/* Font picker */
.fp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.fp-card { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.fp-card.on { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.fp-name { font-size: 16px; font-weight: 600; }
.fp-sample { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fp-note { font-size: 11.5px; color: var(--ink-3); }

/* Loop drawer — the workflow panel */
.od-card { max-width: 760px !important; }
.od-h { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.od-eyebrow { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.od-title { font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.od-sub { font-size: 12.5px; color: var(--ink-3); }
.od-late { color: var(--danger); font-weight: 600; }
.od-rail { display: flex; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin-bottom: 14px; }
.od-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.od-step i { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 1px solid #cfcdc7; box-sizing: border-box; }
.od-step.done i { background: var(--navy); border-color: var(--navy); }
.od-step.now i { width: 12px; height: 12px; border: 2px solid var(--danger); background: #fff; }
.od-step span { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.od-step.now span { color: var(--ink); font-weight: 600; }
.od-line { height: 1px; background: #d9d7d1; flex: 1; margin-bottom: 18px; }
.od-sec { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.od-note { padding: 12px 14px; border-radius: 12px; background: #f7f7f5; font-size: 13px; line-height: 1.5; }
.skel-line { color: var(--ink-3); }
.od-step-h { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; margin-top: 6px; }
.od-step-h i { width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; font-weight: 600; font-style: normal; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.od-val { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; padding: 6px 0 4px 32px; color: var(--ink-2); }
.od-ok { color: var(--ok); } .od-bad { color: var(--danger); } .od-unk { color: var(--ink-3); }
.od-crit { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 0 8px 32px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.od-ck { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; border: 1.5px solid; }
.od-ck.ok { color: var(--ok); border-color: var(--ok); } .od-ck.bad { color: var(--danger); border-color: var(--danger); } .od-ck.unk { color: var(--ink-3); border-color: #cfcdc7; }
.od-crit-e { font-size: 12px; color: var(--ink-3); max-width: 240px; text-align: right; }
.od-rec { margin-top: 10px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.od-rec.approve { border-color: var(--ok-border); background: var(--ok-bg); } .od-rec.hold { border-color: var(--warn-border); background: var(--warn-bg); } .od-rec.deny_or_convert { border-color: var(--danger-border); background: var(--danger-bg); }
.od-rec-t { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.od-rec-r, .od-rec-f { font-size: 12px; color: var(--ink-2); }
.ops-roster{width:100%;display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}
.ops-work-h h3{font-size:17px;font-weight:700;letter-spacing:-.02em;margin:0}
.ops-sub{font-size:12px;color:var(--mut,#6b7280)}
.ops-stages{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 12px;padding-bottom:12px;border-bottom:1px solid var(--line,#eef0f3)}
.ops-stage{all:unset;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 14px;border:1px solid var(--line,#e5e7eb);border-radius:12px;min-width:96px}
.ops-stage b{font-size:18px;font-weight:700}.ops-stage span{font-size:11px;color:var(--mut,#6b7280);white-space:nowrap}
.ops-stage.on{border-color:var(--acc,#1B2B5B);background:rgba(27,43,91,.05)}
.ops-row{display:flex;align-items:center;gap:12px;padding:10px 10px;border-radius:10px;cursor:pointer;border-bottom:1px solid var(--line,#f1f5f9)}
.ops-row:hover{background:var(--hov,#f8fafc)}
.ops-row.late{border-left:3px solid #dc2626;padding-left:8px}
.ops-who{font-size:16px;width:22px;text-align:center}
.ops-row-m{flex:1;min-width:0}
.ops-row-t{font-size:13px}.ops-row-t b{font-weight:700}
.ops-row-s{font-size:12px;color:var(--mut,#6b7280);margin-top:2px}.ops-row-s i{font-style:normal;color:var(--ink-2,#374151);font-weight:600}
.ops-row-a{display:flex;gap:6px;flex-shrink:0}
.cal-btn.sm{padding:4px 10px;font-size:12px}
.ops-due{font-size:11px;font-weight:600;color:var(--mut,#6b7280)}.ops-due.late{color:#dc2626}.ops-due.soon{color:#b45309}
.ops-d-h{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-bottom:6px}
.ops-d-sub{font-size:14px;font-weight:600;margin-bottom:8px}
.ops-kvs{display:grid;grid-template-columns:1fr 1fr;gap:4px 16px}
.ops-kv{display:flex;justify-content:space-between;gap:8px;font-size:12px;padding:3px 0;border-bottom:1px dashed var(--line,#eef0f3)}
.ops-kv span{color:var(--mut,#6b7280);text-transform:capitalize}.ops-kv b{font-weight:600;text-align:right}
.ops-ev{display:grid;grid-template-columns:120px 110px 1fr;gap:8px;font-size:12px;padding:6px 0;border-bottom:1px solid var(--line,#f1f5f9)}
.ops-ev-t{color:var(--mut,#6b7280)}.ops-ev-a{font-weight:600;text-transform:capitalize}
@media (max-width:980px){.ops-main{grid-template-columns:1fr;height:auto}.ops-grip{display:none}.ops-tiles{overflow:visible;flex-direction:row;flex-wrap:wrap}.ops-tile{width:calc(50% - 5px)}.ops-work{overflow:visible}}

/* Settings → Integrations */
.ig-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px;margin:8px 0 14px}
.ig-card{border:1px solid var(--line,#e5e7eb);border-radius:12px;padding:12px 14px;background:var(--card,#fff);display:flex;flex-direction:column;gap:5px;text-align:left}
.ig-h{display:flex;align-items:center;justify-content:space-between;gap:8px}
.ig-h b{font-size:13.5px}
.ig-st{font-size:10.5px;font-weight:700;border-radius:999px;padding:2px 8px;white-space:nowrap}
.ig-st.ok{background:#dcfce7;color:#166534}.ig-st.warn{background:#fef3c7;color:#92400e}.ig-st.bad{background:#fee2e2;color:#991b1b}.ig-st.info{background:#e0f2fe;color:#075985}
.ig-meta{font-size:11.5px;color:var(--mut,#6b7280);line-height:1.5}
.ig-acts{display:flex;gap:6px;margin-top:4px;flex-wrap:wrap}

/* referral composer: nearby-provider rows */
.cpoe-sugrow.prior{border-color:var(--acc);background:var(--acc-soft)}
.cpoe-sugrow.on{outline:2px solid var(--acc);outline-offset:-2px}
.cpoe-sugrow em{font-style:normal;font-size:11px;font-weight:600;color:var(--acc);margin-left:6px}
.cpoe-sugrow i{font-style:normal;font-size:11px;color:var(--ok,#1a7f4b);margin-left:6px}

/* clearinghouse eligibility on the Coverage card */
.elig-line{margin-top:8px;padding-top:8px;border-top:1px solid var(--line,#e6e4df)}
.elig-top{display:flex;align-items:center;gap:8px}
.elig-when{font-size:11px;color:var(--muted,#6b6b66);flex:1}
.elig-chip{font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;background:#f0efeb;color:#444}
.elig-chip.ok{background:#e6f4ec;color:#1a7f4b}.elig-chip.bad{background:#fbe9e7;color:#b3261e}.elig-chip.warn{background:#fff4d6;color:#7a5a00}.elig-chip.quiet{color:#777}
.elig-line .s .bad{color:#b3261e}

/* Tell WellPlus */
.as-box{display:flex;flex-direction:column;gap:10px;min-width:560px}
.as-in{width:100%;font:inherit;font-size:15px;padding:12px 14px;border:1px solid var(--line,#e6e4df);border-radius:10px;resize:vertical;background:#fff}
.as-row{display:flex;align-items:center;gap:10px}.as-hint{flex:1;font-size:12px;color:var(--muted,#6b6b66)}
.as-heard{font-size:12.5px;color:var(--muted,#6b6b66);margin:4px 0 8px}
.as-step{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line,#e6e4df);border-radius:10px;margin-bottom:6px;font-size:14px;background:#fff;cursor:pointer}
.as-step.off{opacity:.55}.as-step em{margin-left:auto;font-style:normal;font-size:11px;color:#7a5a00;background:#fff4d6;padding:2px 8px;border-radius:999px}
.as-done{display:flex;flex-direction:column;gap:6px}.as-res{font-size:13.5px;padding:6px 10px;border-radius:8px;background:#f5f5f2}.as-res.ok{color:#1a5c3a}.as-res.bad{color:#b3261e}
/* Operations — simple view */
.ops-simple{display:flex;flex-direction:column;gap:12px;max-width:1100px}
.ops-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ops-top-t{font-size:20px}.ops-top-t b{font-weight:700}.ops-top-t span{font-size:13px;color:var(--muted,#6b6b66)}
.ops-top-a{display:flex;gap:6px}
.ops-chips{display:flex;gap:6px;flex-wrap:wrap}
.ops-chip{font:inherit;font-size:12.5px;padding:5px 10px;border:1px solid var(--line,#e6e4df);border-radius:999px;background:#fff;cursor:pointer;display:inline-flex;gap:6px;align-items:center}
.ops-chip b{font-weight:600}.ops-chip em{font-style:normal;font-size:11px;background:var(--acc,#1E2E60);color:#fff;border-radius:999px;padding:0 6px}
.ops-chip.on{background:var(--acc-soft,#e8edf7);border-color:var(--acc,#1E2E60)}.ops-chip.hot{border-color:#b3261e}
.ops-sec{background:#fff;border:1px solid var(--line,#e6e4df);border-radius:12px;padding:10px 14px}
.ops-sec h3{margin:4px 0 8px;font-size:13px;text-transform:uppercase;letter-spacing:.5px;color:var(--muted,#6b6b66);display:flex;align-items:center;gap:8px}
.ops-sec h3 i{font-style:normal;font-size:11px;color:var(--acc,#1E2E60);cursor:pointer;margin-left:auto}.ops-sec .ops-n{font-weight:600;color:#333}
.ops-sec.quiet{background:transparent}
.ops-line{display:flex;align-items:center;gap:12px;padding:10px 6px;border-top:1px solid var(--line,#ecebe7);cursor:pointer}
.ops-line:first-of-type{border-top:0}.ops-line.late .ops-line-age{color:#b3261e;font-weight:600}
.ops-line-m{flex:1;font-size:14.5px;line-height:1.4}.ops-line-age{font-size:12px;color:var(--muted,#6b6b66);margin-left:6px}
.ops-line.auto{color:#555;font-size:13.5px}
.ops-modeline{margin-top:8px}

/* ═══ The simple layer ═══ */
.topbar-find{position:relative;margin:0 6px 0 10px;min-width:340px;max-width:520px;flex:1;padding:2px 6px 2px 14px;border-radius:12px;margin-bottom:0}
.topbar-find input{font-size:14px;padding:9px 0}
.topbar-find #searchResults{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:60;max-height:60vh;overflow:auto}
.sr-tell{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;cursor:pointer;color:var(--acc,#1E2E60);font-weight:600;border-bottom:1px solid var(--line,#ecebe7)}
.sr-tell small{color:#888;font-weight:400}
.wp-hint{background:var(--acc-soft,#e8edf7);border:1px solid #cfd8ee;border-radius:12px;padding:10px 14px;font-size:13px;line-height:1.5;margin:-6px 0 16px;color:#233}
.wp-hint a{margin-left:8px;font-weight:600}
.fy-head{font-size:12px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted,#6b6b66);padding:6px 8px 8px;display:flex;align-items:center;gap:8px}
.fy-n{background:var(--acc,#1E2E60);color:#fff;border-radius:999px;padding:0 8px;font-size:11px;letter-spacing:0}
.fy-stack{width:100%;display:flex;align-items:center;gap:10px;padding:11px 10px;border:1px solid transparent;background:transparent;border-radius:12px;cursor:pointer;text-align:left;font:inherit}
.fy-stack svg{width:18px;height:18px;color:var(--acc,#1E2E60);flex:none}
.fy-stack .fy-t{flex:1;font-size:14px;color:var(--ink,#1a1a1a);line-height:1.3}.fy-stack .fy-t b{font-size:16px;font-weight:700;margin-right:2px}
.fy-stack .fy-t em{display:block;font-style:normal;font-size:11px;color:#b3261e;font-weight:600}
.fy-go{font-size:12px;font-weight:600;color:var(--acc,#1E2E60);background:var(--acc-soft,#e8edf7);border-radius:999px;padding:5px 11px;white-space:nowrap}
.fy-stack:hover{background:#fff;border-color:var(--line,#e6e4df)}.fy-stack.on{background:#fff;border-color:var(--acc,#1E2E60)}
.fy-stack.doc svg{color:#1a7f4b}.fy-stack.late .fy-go{background:#fbe9e7;color:#b3261e}
.fy-empty{padding:18px 10px;color:var(--muted,#6b6b66);font-size:14px;line-height:1.5}.fy-empty.big{font-size:18px;padding:40px 20px;text-align:center}.fy-empty small{font-size:12.5px}
.fy-foot{padding:8px 10px;font-size:12px;color:var(--muted,#6b6b66)}
.wp-session{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);background:var(--acc,#1E2E60);color:#fff;border-radius:999px;padding:8px 10px 8px 16px;display:flex;align-items:center;gap:10px;font-size:13px;z-index:1200;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.wp-session .cal-btn{background:#fff;color:var(--acc,#1E2E60);border:0}.wp-session .cal-btn.quiet{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.4)}
.ops-fy{display:grid;grid-template-columns:300px 1fr;gap:14px;align-items:start}
.ops-fy-l{background:var(--glass,#fff);border:1px solid var(--line,#e6e4df);border-radius:12px;padding:6px}
.ops-fy-r{min-width:0}
.queue{grid-template-columns:256px 1fr}
.fy-stack .fy-t{font-size:13.5px}

.ops-chip.empty{opacity:.5}.ops-chip.empty b{color:#999}

/* stack list: grouped, one verb per row */
.fy-list-h{display:flex;align-items:center;gap:12px;padding:6px 4px 10px}
.fy-list-t{font-size:16px;flex:1}.fy-list-t b{font-size:20px;font-weight:700}
.fy-seg{display:inline-flex;border:1px solid var(--line,#e6e4df);border-radius:999px;overflow:hidden;background:#fff}
.fy-seg button{font:inherit;font-size:12px;padding:5px 12px;border:0;background:transparent;cursor:pointer;color:#555}.fy-seg button.on{background:var(--acc,#1E2E60);color:#fff}
.fy-batch{display:flex;align-items:center;gap:12px;background:var(--acc-soft,#e8edf7);border:1px solid #cfd8ee;border-radius:12px;padding:10px 14px;margin:0 0 10px}
.fy-batch>div{flex:1;font-size:13px}.fy-batch b{display:block}.fy-batch span{color:#455;font-size:12px}
.fy-list{background:#fff;border:1px solid var(--line,#e6e4df);border-radius:12px;padding:4px 12px}
.fy-group h4{margin:12px 0 4px;font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:var(--muted,#6b6b66)}.fy-group h4 span{font-weight:600;color:#333;margin-left:6px}
.fy-row{display:flex;align-items:center;gap:10px;padding:9px 2px;border-top:1px solid #f0efeb}.fy-row:first-child,.fy-group h4+.fy-row{border-top:0}
.fy-row-m{flex:1;font-size:14px;line-height:1.35;min-width:0}.fy-things{color:#444}
.fy-age{font-size:11.5px;color:var(--muted,#6b6b66);margin-left:6px}.fy-late{font-size:11.5px;color:#b3261e;margin-left:6px;font-weight:600}
.fy-more{border:0;background:transparent;font-size:18px;line-height:1;padding:2px 8px;color:#777;cursor:pointer;border-radius:8px}.fy-more:hover{background:#f0efeb;color:#222}
.fy-showall{border:0;background:transparent;color:var(--acc,#1E2E60);font:inherit;font-size:12.5px;padding:8px 2px;cursor:pointer}

/* ═══ SPEC §15 tokens + Today / Work ═══ */
.ph-grid.td{grid-template-columns:3fr 2fr;gap:24px}
.td-agenda{background:#fff;border:1px solid #E5E3DD;border-radius:12px;padding:16px 20px}
.td-h{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.td-nav{border:0;background:transparent;font-size:20px;cursor:pointer;color:#626660;padding:0 6px}.td-date{border:0;background:transparent;font:inherit;font-size:18px;font-weight:600;cursor:pointer;color:#202124}
.td-n{font-size:13px;color:#626660;flex:1}
.td-row{display:flex;align-items:center;gap:12px;padding:10px 4px;border-top:1px solid #F0EEE9;cursor:pointer;font-size:15px}.td-row:hover{background:#FAF9F6}
.td-time{width:78px;color:#626660;font-variant-numeric:tabular-nums}.td-reason{flex:1;color:#626660}.td-st{font-size:12px;color:#626660}
.td-cur{border:1px solid #1E2E60;border-radius:12px;padding:16px 18px;margin:6px 0}
.td-cur-t{display:flex;align-items:center;gap:12px;font-size:17px}.td-cur-t b{font-size:19px}
.td-cur-s{margin:8px 0 12px;font-size:15px;color:#202124}.td-cur-a{display:flex;gap:8px}
.td-for{background:#fff;border:1px solid #E5E3DD;border-radius:12px;padding:16px 20px}
.fy-rec{border:1px solid #E5E3DD;border-radius:12px;padding:20px;margin:6px 0 10px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.fy-rec-t{font-size:22px;font-weight:700;color:#202124;letter-spacing:-.01em}.fy-rec-s{font-size:14px;color:#626660;margin:4px 0 14px}
.fy-rec-b{min-height:44px;font-size:15px;padding:0 20px}
.fy-rows{display:flex;flex-direction:column}
.fy-row2{display:flex;justify-content:space-between;align-items:center;width:100%;font:inherit;font-size:15px;padding:12px 6px;border:0;border-top:1px solid #F0EEE9;background:transparent;cursor:pointer;color:#202124;text-align:left}.fy-row2:hover{background:#FAF9F6}.fy-row2 i{color:#9a9a94;font-style:normal}
.fy-all{display:block;padding:12px 6px;font-size:14px;color:#3480C3;border-top:1px solid #F0EEE9}
.fy-foot{font-size:13px;color:#626660;padding:14px 6px 2px}
.fy-late{color:#B3261E;font-size:12.5px;font-weight:600}.fy-why{color:#626660;font-size:12.5px}
.wk{max-width:1100px}.wk-h{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:4px 0 20px}
.wk h1{font-size:26px;font-weight:700;letter-spacing:-.02em;margin:0}.wk-sub{font-size:15px;color:#626660;margin-top:4px}.wk-sub b{color:#202124}
.wk-tools{display:flex;gap:8px;align-items:center}
.wk-g{background:#fff;border:1px solid #E5E3DD;border-radius:12px;margin-bottom:12px;overflow:hidden}
.wk-g-h{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;cursor:pointer}.wk-g-h:hover{background:#FAF9F6}
.wk-g-h h2{font-size:18px;margin:0;display:flex;align-items:center;gap:10px}.wk-n{font-size:13px;font-weight:600;color:#fff;background:#1E2E60;border-radius:999px;padding:1px 9px}
.wk-g-l{font-size:14px;color:#626660;margin-top:3px}.wk-caret{color:#9a9a94;font-size:18px}
.wk-cards{padding:0 20px 16px}
.wk-card{border-top:1px solid #F0EEE9;padding:14px 0}.wk-card-m{font-size:16px}.wk-card-a{display:flex;gap:10px;align-items:center;margin-top:8px}
.wk-roster{margin-top:10px}
.rs-h{display:flex;align-items:center;gap:10px;font-size:14px;padding:8px 0}.rs-h b{font-size:16px}
.rs-list{background:#fff;border:1px solid #E5E3DD;border-radius:12px}
.rs-row{display:flex;align-items:center;gap:12px;padding:12px 16px;border-top:1px solid #F0EEE9;cursor:pointer}.rs-row:first-child{border-top:0}.rs-row:hover{background:#FAF9F6}
.rs-m{flex:1;min-width:0}.rs-m b{font-size:15.5px}.rs-needs{font-size:14px;color:#202124;margin-top:2px}.rs-st{margin-top:2px}
.rs-x{border:0;background:transparent;font-size:20px;color:#9a9a94;cursor:pointer;padding:0 6px}
.rs-det{padding:0 16px 10px 16px;background:#FAF9F6}.rs-det-row{display:flex;justify-content:space-between;gap:12px;font-size:13.5px;padding:6px 0;border-top:1px solid #F0EEE9}
.wp-session{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);background:#1E2E60;color:#fff;border-radius:14px;padding:10px 12px 10px 18px;display:flex;align-items:center;gap:18px;font-size:14px;z-index:1200;box-shadow:0 8px 24px rgba(0,0,0,.18);max-width:90vw}
.ws-r{display:flex;align-items:center;gap:8px}.wp-session .cal-btn{background:#fff;color:#1E2E60;border:0;min-height:36px}.wp-session .cal-btn.quiet{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.4)}
.rc-h{font-size:18px;font-weight:600;margin-bottom:10px}.rc-row{font-size:15px;padding:6px 0;border-top:1px solid #F0EEE9}.rc-next{margin-top:12px;font-size:14px;color:#626660}
.ac-list{background:#fff;border:1px solid #E5E3DD;border-radius:12px}.ac-row{display:grid;grid-template-columns:130px 90px 1fr;gap:12px;padding:10px 16px;border-top:1px solid #F0EEE9;font-size:14px}.ac-row:first-child{border-top:0}.ac-t,.ac-who{color:#626660;font-size:13px}
.cn-row{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-top:1px solid #F0EEE9}.cn-row:first-child{border-top:0}.cn-row.bad b{color:#B3261E}.cn-row.ok .fy-why{color:#1a7f4b}
@media (max-width:1180px){.ph-grid.td{grid-template-columns:1fr}}

.as-who{font-size:13px;color:#626660}
.as-heard{font-size:13px;color:#626660;margin:4px 0 8px}.as-heard summary{cursor:pointer}
.as-sec{border:1px solid #E5E3DD;border-radius:12px;padding:12px 14px;margin-bottom:8px;background:#fff}.as-sec-h{font-size:11.5px;text-transform:uppercase;letter-spacing:.5px;color:#626660;margin-bottom:3px}.as-sec-b{font-size:15px;line-height:1.45}
.as-edit{border-bottom:1px dashed #9a9a94;cursor:pointer}.as-edit:hover{color:#3480C3;border-color:#3480C3}
.ws-card{background:#fff;border:1px solid #E5E3DD;border-radius:12px;padding:18px 20px;margin:0 0 18px}
.ws-h{display:flex;align-items:baseline;gap:12px}.ws-h h2{margin:0;font-size:20px}
.ws-nums{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:14px 0}.ws-nums b{display:block;font-size:22px;font-variant-numeric:tabular-nums}.ws-nums b.bad{color:#B3261E}.ws-k{font-size:12px;color:#626660;text-transform:uppercase;letter-spacing:.4px}
.ws-drivers{display:flex;gap:16px;flex-wrap:wrap;font-size:14px;color:#626660}.ws-drv b{color:#202124}
.ws-import{display:flex;gap:8px;align-items:center;margin-top:12px;flex-wrap:wrap}.ws-empty{font-size:15px;color:#626660;margin:10px 0}
.ws-hc{margin-top:12px}.ws-hc summary{cursor:pointer;font-size:14px;color:#3480C3}

/* ═══ SPEC §15 — calm tokens ═══ */
:root{--bg:#F7F6F2;--card:#fff;--line:#E5E3DD;--ink:#202124;--muted:#626660;--acc:#1E2E60;--acc-soft:#E8EDF7;--link:#3480C3;--bad:#B3261E;--ok:#1a7f4b}
body{background:#F7F6F2;color:#202124}
.cal-btn.primary,.btn-primary{background:#1E2E60;color:#fff;min-height:36px}
a{color:#3480C3}
/* ═══ SPEC §6 — the encounter gets the center ═══ */
.vr-top{font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:#626660;padding:8px 12px 2px}
.vr-more{display:block;padding:6px 12px 10px;font-size:13px;color:#3480C3;background:transparent;border:0;cursor:pointer}


.fy-top{grid-column:1/-1;margin-bottom:0}.fy-rec.slim{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;margin:0}.fy-rec.slim .fy-rec-t{font-size:18px}.fy-rec.slim .fy-rec-s{margin:2px 0 0}
@media (max-width:1180px){.fy-top{grid-column:1}}


/* per-need rows with their path to closure */
.fy-pt{border-top:1px solid #ECEBE7;padding:10px 0 6px}.fy-pt:first-child{border-top:0}
.fy-pt-h{display:flex;align-items:center;gap:10px;margin-bottom:4px}.fy-pt-h b{font-size:15.5px}.fy-pt-a{margin-left:auto;display:flex;gap:6px}
.nd{display:flex;align-items:center;gap:12px;padding:8px 0 8px 12px;border-left:2px solid #ECEBE7;margin:2px 0}
.nd-m{flex:1;min-width:0}.nd-t{font-size:14px}.nd-s{font-size:12.5px;color:#626660;margin-top:2px}
.nd-path{display:flex;gap:4px;margin:4px 0 2px;flex-wrap:wrap}
.nd-path span{font-size:11px;padding:2px 8px;border-radius:999px;background:#F3F2EE;color:#8a8a84}
.nd-path span.done{background:#E6F4EC;color:#1a7f4b}.nd-path span.on{background:#1E2E60;color:#fff}
.nd-a{display:flex;align-items:center;gap:6px}.nd-wait{font-size:12.5px;color:#626660;font-style:italic}
.pc-h{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.pc-acts{display:flex;gap:6px}
.pc-sec{border:1px solid #E5E3DD;border-radius:12px;padding:8px 14px;margin-bottom:10px;background:#fff}.pc-sec.quiet{background:#FAF9F6}
.pc-sec h4{margin:4px 0 6px;font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:#626660}

.q-rail-foot{padding:10px 11px 6px;font-size:12px;color:#626660}.q-rail-foot a{color:#3480C3}

/* Your day */
.md{max-width:860px;margin:0 auto;padding-top:18px}
.md-h{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px}.md h1{font-size:36px;letter-spacing:-.02em;margin:0;color:#202124}.md-sub{font-size:17px;color:#626660;margin-top:4px}
.md-next{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#fff;border:1px solid #1E2E60;border-radius:14px;padding:26px 30px;margin-bottom:12px}
.md-eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:#626660}.md-t{font-size:26px;font-weight:700;margin-top:4px}.md-s{font-size:16px;color:#626660;margin-top:4px}
.md-start{min-height:52px;font-size:18px;padding:0 34px}
.md-list{background:#fff;border:1px solid #E5E3DD;border-radius:14px;padding:4px 30px}
.md-row{display:flex;align-items:center;gap:16px;padding:16px 0;border-top:1px solid #F0EEE9;cursor:pointer}.md-row:first-child{border-top:0}.md-row:hover .md-rt{color:#1E2E60}
.md-n{width:26px;color:#626660;font-size:15px}.md-m{flex:1}.md-rt{font-size:17px}.md-rs{font-size:14px;color:#626660;margin-top:2px}.md-time{color:#626660;font-size:14px}
.md-foot{display:flex;justify-content:space-between;align-items:center;padding:12px 6px;font-size:14px;color:#626660}.md-foot a{color:#3480C3}
.md-y{margin-top:14px;background:#FAF9F6;border:1px solid #E5E3DD;border-radius:12px;padding:14px 18px;font-size:14.5px;color:#626660}.md-y b{color:#202124}
/* ── Work as rows (work.js) ── */
.aw{max-width:1080px;display:flex;flex-direction:column;gap:6px}
.aw-crumb{font-size:13px;color:#6b6b66;margin-bottom:2px}.aw-crumb a{color:#1E2E60;text-decoration:none}
.aw-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:6px 0 14px}
.aw-hero h2{font-size:24px;font-weight:600;margin:0 0 4px;letter-spacing:-.01em}.aw-hero p{margin:0;color:#626660;font-size:14px}
.aw-hero-a{display:flex;gap:8px;align-items:center;flex-shrink:0}
.aw-sec{font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:#8a8a84;margin:14px 0 2px}
.aw-kind{display:flex;align-items:center;gap:14px;padding:12px 14px;border:1px solid #E5E3DD;border-radius:12px;background:#fff;cursor:pointer;transition:box-shadow .15s}
.aw-kind:hover{box-shadow:0 2px 10px rgba(30,46,96,.08)}.aw-kind.dim{opacity:.55;cursor:default;background:#FAF9F6}
.aw-ic{width:34px;height:34px;border-radius:9px;background:#F3F2EE;display:flex;align-items:center;justify-content:center;font-size:17px;color:#1E2E60;flex-shrink:0}
.aw-m{flex:1;min-width:0}.aw-m h3{margin:0;font-size:15.5px;font-weight:600}.aw-m h3 small{font-weight:400;color:#8a8a84;font-size:12.5px;margin-left:6px}
.aw-s{font-size:13px;color:#626660;margin-top:2px}.aw-bad{color:#B3261E}
.aw-bar{display:flex;height:5px;border-radius:3px;background:#F3F2EE;overflow:hidden;margin-top:8px;max-width:520px}
.aw-bar i{display:block;height:100%;background:#7FBF9A}.aw-bar i.you{background:#1E2E60}
.aw-act{display:flex;align-items:center;gap:12px;flex-shrink:0}.aw-n{font-size:20px;font-weight:600;text-align:right;line-height:1}.aw-n small{display:block;font-size:11px;color:#8a8a84;font-weight:400;margin-top:2px}
.aw-foot{font-size:12.5px;color:#8a8a84;margin-top:14px}.aw-foot a{color:#1E2E60}
.aw-list{border:1px solid #E5E3DD;border-radius:12px;background:#fff;padding:4px 12px}.aw-list.quiet{opacity:.8}
/* choose card */
.ch{display:grid;grid-template-columns:1.4fr 1fr;gap:20px}.ch-l h2{font-size:20px;margin:0 0 8px}
.ch-ev{font-size:13px;color:#626660;padding:8px 10px;border-radius:8px;background:#FAF9F6;margin-bottom:12px}.ch-ev.ok{background:#E6F4EC;color:#1a5c38}.ch-ev.bad{background:#FBECEA;color:#8a1f18}.ch-ev.hold{background:#FFF6E0;color:#7a5200}
.ch-opts{display:flex;flex-direction:column;gap:8px}
.ch-opt{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 14px;border:1px solid #E5E3DD;border-radius:10px;cursor:pointer;background:#fff}
.ch-opt:hover{border-color:#1E2E60}.ch-opt.rec{border-color:#1E2E60;box-shadow:inset 3px 0 0 #1E2E60}.ch-opt.has{background:#FAF9F6}.ch-opt.busy{opacity:.5;pointer-events:none}
.ch-opt b{display:block;font-size:14.5px}.ch-opt span{display:block;font-size:12.5px;color:#626660;margin-top:2px}.ch-opt em{font-style:normal;color:#1E2E60}
.ch-tag{font-size:11.5px;padding:3px 9px;border-radius:999px;background:#F3F2EE;color:#555;white-space:nowrap;flex-shrink:0}.ch-opt.rec .ch-tag{background:#1E2E60;color:#fff}
.ch-note{font-size:12.5px;color:#626660;margin:10px 0}.ch-actions{display:flex;gap:8px;margin-top:8px}
.ch-r{background:#FAF9F6;border-radius:12px;padding:14px 16px}.ch-r h3{margin:0 0 10px;font-size:15px}
.ch-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}.ch-steps li{display:flex;gap:10px;align-items:flex-start}
.ch-steps .n{width:22px;height:22px;border-radius:50%;border:1px solid #D8D6CF;font-size:11px;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:#8a8a84;background:#fff}
.ch-steps .n.done{background:#E6F4EC;border-color:#E6F4EC;color:#1a7f4b}.ch-steps .n.now{background:#1E2E60;border-color:#1E2E60;color:#fff}
.ch-steps b{display:block;font-size:13.5px}.ch-steps span:not(.n){display:block;font-size:12px;color:#626660}.ch-foot{font-size:12px;color:#8a8a84;margin-top:12px}
@media (max-width:820px){.ch{grid-template-columns:1fr}}
/* standing orders */
.so-intro{font-size:13px;color:#626660;margin-bottom:12px}
.so-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:10px 0;border-top:1px solid #ECEBE7}.so-row b{display:block;font-size:14px}.so-row span{display:block;font-size:12.5px;color:#626660;margin-top:2px}
.so-row.on b::before{content:'✓ ';color:#1a7f4b}.so-row details{margin-top:4px;font-size:12px;color:#8a8a84}.so-row details p{margin:4px 0 0;color:#626660}.so-who{font-size:12px;color:#8a8a84;white-space:nowrap}
/* item headline + records review + call options */
.it-head{margin:4px 0 10px;padding:12px 14px;border-radius:10px;background:#FAF9F6}
.it-status{font-size:15px;font-weight:600}.it-next{font-size:13px;color:#3d3f3a;margin-top:6px}.it-next b{font-weight:600;color:#1E2E60}
.it-fb{display:block;font-size:12.5px;color:#8a8a84;margin-top:3px}
.rv{display:grid;grid-template-columns:1fr 1.2fr;gap:18px}.rv-src{max-height:52vh;overflow:auto;white-space:pre-wrap;font-size:12.5px;line-height:1.5}
.od-rec.ok{border-left:3px solid #1a7f4b;background:#E6F4EC}
@media (max-width:820px){.rv{grid-template-columns:1fr}}
.cc-opts{margin:10px 0 14px}.cc-opt{margin:6px 0 10px}.cc-opt>b{font-size:14px}
.cc-opt-l{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 4px}.cc-opt-s{font-size:12px;color:#8a8a84}
.ch-mini{font:inherit;font-size:12.5px;padding:6px 11px;border-radius:999px;border:1px solid #E5E3DD;background:#fff;cursor:pointer}.ch-mini.rec{border-color:#1E2E60;color:#1E2E60;font-weight:600}.ch-mini.on{background:#1E2E60;color:#fff}.ch-mini:disabled{opacity:.6}
.ws-fix{margin:8px 0;padding:8px 12px;border-radius:8px;background:#FFF6E0;color:#7a5200;font-size:13px}.ws-fix a{color:#1E2E60}
.sl-opts{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.sl-opt{font:inherit;text-align:left;padding:12px 14px;border:1px solid #E5E3DD;border-radius:10px;background:#fff;cursor:pointer}.sl-opt:hover{border-color:#1E2E60}
.sl-opt b{display:block;font-size:14px}.sl-opt span{display:block;font-size:12.5px;color:#626660;margin-top:2px}
.ar-fields{margin-top:10px}
.sb-said{background:#FAF9F6;border-radius:10px;padding:10px 14px;margin-bottom:12px}.sb-said p{margin:4px 0 0;font-size:15px;font-style:italic}
.cv-main{padding:6px 0 10px}.cv-when{font-size:22px;font-weight:600;margin:4px 0}
.od-step{background:none;border:0;padding:0;cursor:pointer;font:inherit}.od-step:hover span{color:var(--navy)}.od-step:hover i{box-shadow:0 0 0 3px rgba(30,46,96,.15)}
.od-step span{white-space:normal;text-align:center;line-height:1.2;font-size:11px;overflow:visible;text-overflow:clip}
.fx-preview.editing{outline:2px solid var(--navy);background:#FFFDF5}
/* steps pages (steps.js) */
.sp{display:grid;grid-template-columns:300px 1fr;gap:20px;max-width:1240px}
.sp-steps{background:#fff;border:1px solid #E5E3DD;border-radius:12px;overflow:hidden}
.sp-steps h3{margin:0;padding:12px 16px;font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:#8a8a84;border-bottom:1px solid #EEEDE8}
.sp-step{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:11px 16px;border:0;border-bottom:1px solid #F1F0EB;background:#fff;cursor:pointer;font:inherit;position:relative}
.sp-step.on{background:#E8EDF7}.sp-step.on::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:#1E2E60}
.sp-dot{width:10px;height:10px;border-radius:50%;border:2px solid #C9C7C0;background:#fff;flex-shrink:0}.sp-dot.you{border-color:#1E2E60;background:#1E2E60}.sp-dot.auto{border-color:#7FBF9A;background:#7FBF9A}
.sp-t{flex:1;font-size:14px}.sp-t small{display:block;color:#8a8a84;font-size:11.5px}
.sp-n{font-weight:700;font-size:15px;min-width:24px;text-align:right}.sp-n.you{color:#1E2E60}.sp-n.auto{color:#4a9a6d}
.sp-foot{font-size:12px;color:#8a8a84;padding:12px 16px}
.sp-main h2{font-size:22px;margin:4px 0 2px;font-weight:700}.sp-sub{font-size:13.5px;color:#626660;margin-bottom:12px}
.sp-batch{display:flex;justify-content:space-between;align-items:center;background:#E8EDF7;border-radius:12px;padding:10px 16px;margin-bottom:12px;font-size:14px;gap:12px}.sp-batch b{display:block}.sp-batch span{color:#4b5570;font-size:13px}
.sp-pt{background:#fff;border:1px solid #E5E3DD;border-radius:12px;padding:12px 16px;margin-bottom:10px}.sp-pt.moved{border-color:#7FBF9A;background:#F3FAF5}
.sp-h{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.sp-h b{font-size:16px}.sp-why{color:#626660;font-size:13.5px;flex:1;min-width:200px}.sp-moved{color:#1a7f4b;font-size:13px;font-weight:600}
.sp-rail{display:flex;align-items:center;margin:10px 0 0}
.sp-s{display:flex;flex-direction:column;align-items:center;gap:4px;flex:1;min-width:0;background:none;border:0;padding:0;cursor:pointer;font:inherit}
.sp-s i{width:11px;height:11px;border-radius:50%;border:2px solid #D8D6CF;background:#fff;box-sizing:border-box}.sp-s.done i{background:#1E2E60;border-color:#1E2E60}.sp-s.now i{border-color:#B3261E;width:13px;height:13px}
.sp-s span{font-size:11px;color:#8a8a84;text-align:center;line-height:1.15}.sp-s.now span{color:#202124;font-weight:600}.sp-s.done span{color:#1E2E60}
.sp-s:hover i{box-shadow:0 0 0 3px rgba(30,46,96,.15)}
.sp-l{height:2px;background:#E5E3DD;flex:1;max-width:48px;margin-bottom:16px}
@media (max-width:900px){.sp{grid-template-columns:1fr}}
.sp-s.next i{border-color:#1E2E60;border-style:dashed}.sp-s.next span{color:#1E2E60}
/* ═══ Simple layer — one look with the rest of the EMR (tokens, card surface, type scale) ═══ */
.aw,.sp,.md{font-family:var(--font);color:var(--ink)}
.aw{max-width:1360px;gap:0}
.aw-hero{padding:4px 0 12px}.aw-hero h2{font-size:var(--text-xl);font-weight:700;color:var(--navy);letter-spacing:-.015em;margin:0 0 2px}.aw-hero p{color:var(--ink-2);font-size:var(--text-md)}
.aw-next{display:flex;justify-content:space-between;align-items:center;gap:16px;background:var(--brand-grad);color:#fff;border-radius:var(--r-lg);padding:12px 18px;margin-bottom:14px;box-shadow:var(--shadow-md)}
.aw-next b{font-size:15px}.aw-next span{display:block;opacity:.82;font-size:13px;margin-top:2px}.aw-next .cal-btn{background:#fff;color:var(--navy);border-color:transparent}
.aw-cols{display:grid;grid-template-columns:1.15fr 1.15fr .95fr;gap:14px;align-items:start}
.aw-col.card{overflow:hidden}.aw-col h3{margin:0;padding:10px 16px;font-size:var(--text-xs);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);border-bottom:1px solid var(--line-2);display:flex;justify-content:space-between;align-items:center}
.aw-col h3 b{color:var(--cyan-text);letter-spacing:0;text-transform:none;font-size:var(--text-xs);font-weight:650;background:rgba(48,120,192,.12);padding:2px 9px;border-radius:999px}
.aw-k{display:grid;grid-template-columns:28px 1fr auto;gap:10px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--line-2);cursor:pointer;transition:background .1s}
.aw-k:hover{background:rgba(24,36,96,.035)}.aw-k:last-of-type{border-bottom:0}
.aw-k .aw-ic{width:28px;height:28px;border-radius:var(--r-sm);font-size:13px}
.aw-k .aw-m b{font-size:var(--text-md);font-weight:650;color:var(--ink)}.aw-k .aw-m small{color:var(--ink-3);font-size:var(--text-sm);margin-left:6px}
.aw-k .aw-s{font-size:var(--text-sm);color:var(--ink-2);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aw-k .aw-bar{height:4px;margin-top:6px;max-width:320px;background:var(--line-2)}
.aw-k .aw-n{font-size:16px;color:var(--navy)}.aw-k .aw-n small{font-size:10.5px;color:var(--ink-3)}
.aw-quiet{padding:10px 14px;font-size:var(--text-xs);color:var(--ink-3);display:flex;flex-wrap:wrap;gap:6px;align-items:center;border-top:1px solid var(--line-2)}
.aw-quiet span{background:rgba(24,36,96,.05);border-radius:999px;padding:3px 9px}
.aw-foot{font-size:var(--text-xs);color:var(--ink-3);margin-top:12px}
.aw-ic{background:rgba(24,36,96,.06);color:var(--navy)}
.aw-kind,.sp-steps,.sp-pt,.aw-list,.sp-batch,.md-next,.md-row{background:rgba(255,255,255,.97);border:1px solid var(--line);border-radius:var(--r-card);box-shadow:0 1px 2px rgba(24,36,96,.05),0 8px 24px rgba(24,36,96,.06)}
.sp-batch,.aw-hero-a .fy-seg{border-radius:var(--r-lg)}
.sp-steps{overflow:hidden}.sp-steps h3{font-size:var(--text-xs);color:var(--ink-3);border-bottom:1px solid var(--line-2)}
.sp-step{border-bottom:1px solid var(--line-2);background:transparent}.sp-step.on{background:rgba(24,36,96,.06)}.sp-step.on::before{background:var(--navy)}
.sp-t{font-size:var(--text-md);color:var(--ink)}.sp-t small{color:var(--ink-3);font-size:var(--text-xs)}.sp-n.you{color:var(--navy)}.sp-n.auto{color:var(--ok)}
.sp-dot.you{border-color:var(--navy);background:var(--navy)}.sp-dot.auto{border-color:#7FBF9A;background:#7FBF9A}
.sp-main h2{font-size:var(--text-xl);color:var(--navy);letter-spacing:-.015em}.sp-sub{color:var(--ink-2);font-size:var(--text-base)}
.sp-batch{background:rgba(48,120,192,.10);border-color:rgba(48,120,192,.25);box-shadow:none}.sp-batch b{color:var(--navy)}.sp-batch span{color:var(--ink-2)}
.sp-pt{padding:12px 16px}.sp-pt.moved{border-color:rgba(22,163,74,.45);background:rgba(22,163,74,.06)}
.sp-h b{font-size:15px;color:var(--ink)}.sp-why{color:var(--ink-2);font-size:var(--text-base)}.sp-moved{color:var(--ok)}
.sp-s span{color:var(--ink-3)}.sp-s.done span{color:var(--navy)}.sp-s.now span{color:var(--ink)}.sp-s.done i{background:var(--navy);border-color:var(--navy)}.sp-s.now i{border-color:var(--danger)}.sp-l{background:var(--line)}
.sp-foot{color:var(--ink-3);font-size:var(--text-xs)}
.aw-crumb{font-size:var(--text-base);color:var(--ink-3)}.aw-crumb a{color:var(--navy)}
.aw-sec{color:var(--ink-3)}
.md h1{font-size:var(--text-2xl);color:var(--navy);letter-spacing:-.015em}.md-sub{color:var(--ink-2);font-size:var(--text-md)}
.md-next{border-color:var(--line);padding:20px 24px}.md-t{font-size:var(--text-xl);color:var(--ink)}.md-s,.md-eyebrow{color:var(--ink-2)}.md-eyebrow{font-size:var(--text-xs)}
.md-row{margin-bottom:8px}.md-rt{color:var(--ink)}.md-rs{color:var(--ink-2)}
.ch-ev,.ch-r,.sb-said,.it-head,.cv-main{border-radius:var(--r-lg)}.ch-ev{background:rgba(24,36,96,.05);color:var(--ink-2)}.ch-r,.sb-said,.it-head{background:rgba(24,36,96,.04)}
.ch-opt,.sl-opt,.so-row,.ch-mini{border-color:var(--line);border-radius:var(--r-md)}.ch-opt.rec{border-color:var(--navy);box-shadow:inset 3px 0 0 var(--navy)}.ch-tag{background:rgba(24,36,96,.06);color:var(--ink-2)}
.ch-l h2,.ch-r h3,.it-status,.cv-when{color:var(--ink)}.ch-opt span,.sl-opt span,.so-row span,.it-next,.it-fb,.ch-note,.ch-foot,.so-intro{color:var(--ink-2)}.it-fb,.ch-foot{color:var(--ink-3)}
.nd-path span{background:rgba(24,36,96,.06);color:var(--ink-3)}.nd-path span.on{background:var(--navy);color:#fff}
@media (max-width:1100px){.aw-cols{grid-template-columns:1fr 1fr}}@media (max-width:760px){.aw-cols{grid-template-columns:1fr}}
.sp-name{font:inherit;font-size:15px;font-weight:700;color:var(--navy);background:none;border:0;padding:0;cursor:pointer;text-align:left}.sp-name:hover{text-decoration:underline}
.sp-tag{font-size:10.5px;padding:2px 8px;border-radius:999px;background:rgba(48,120,192,.12);color:var(--cyan-text);font-weight:650}
.pp-rec{padding:12px 16px;border-bottom:1px solid var(--line-2)}.pp-rec b{font-size:14px;color:var(--ink)}.pp-acts{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.pp-tl{display:flex;flex-direction:column;gap:2px}.pp-ev{display:grid;grid-template-columns:130px 110px 1fr;gap:10px;padding:6px 0;border-bottom:1px solid var(--line-2);font-size:var(--text-base)}
.pp-ts{color:var(--ink-3);font-variant-numeric:tabular-nums}.pp-who{color:var(--ink-2)}.pp-what{color:var(--ink)}
.wp-nav{display:inline-flex;gap:4px;margin-right:12px;vertical-align:middle}.wp-nav .cal-btn{padding:4px 9px;font-size:11.5px}.aw-hero .wp-nav{display:flex;margin:0 0 6px}
.gp-row{padding:6px 0}.gp-gap{font-size:var(--text-sm);color:var(--ink-3);padding:4px 0 0}.gp-row .sp-pt{box-shadow:none;border:0;padding:6px 0 10px;border-bottom:1px solid var(--line-2);border-radius:0}
.sp-kind{border-bottom:1px solid var(--line-2)}.sp-kind-h{display:flex;align-items:center;gap:8px;width:100%;text-align:left;padding:10px 16px;border:0;background:rgba(24,36,96,.03);cursor:pointer;font:inherit;font-size:var(--text-xs);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2);font-weight:650}
.sp-kind-h b{color:var(--navy);letter-spacing:0}.sp-kind-h em{font-style:normal;margin-left:auto;font-size:10.5px;color:var(--cyan-text);background:rgba(48,120,192,.12);padding:2px 8px;border-radius:999px;text-transform:none;letter-spacing:0}
.sp-kind.on .sp-kind-h{background:rgba(24,36,96,.07);color:var(--navy)}.sp-kind .sp-step{padding-left:24px}
/* voice assistant */
.vx-mic{display:inline-flex;align-items:center;gap:6px;margin-left:10px;padding:7px 12px;border-radius:999px;border:1px solid var(--line);background:rgba(255,255,255,.8);color:var(--navy);font:inherit;font-size:12.5px;font-weight:650;cursor:pointer}
.vx-mic svg{width:15px;height:15px}.vx-mic:hover{background:#fff;box-shadow:var(--shadow)}.vx-mic.on{background:var(--brand-grad);color:#fff;border-color:transparent;animation:vxpulse 1.4s ease-in-out infinite}
@keyframes vxpulse{0%,100%{box-shadow:0 0 0 0 rgba(30,46,96,.35)}50%{box-shadow:0 0 0 8px rgba(30,46,96,0)}}
/* voice status: a pill next to Talk; the detail is a dropdown under it */
.vx-pill{display:inline-flex;align-items:center;gap:7px;max-width:300px;margin-left:8px;padding:6px 10px 6px 9px;border-radius:999px;border:1px solid var(--line);background:rgba(255,255,255,.8);color:var(--ink-2);font:inherit;font-size:12px;font-weight:600;cursor:pointer;transition:box-shadow .15s,background .15s}
.vx-pill:hover{background:#fff;box-shadow:var(--shadow)}
.vx-pill .vx-pill-t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.vx-pill .vx-pill-n{font-size:10.5px;font-weight:800;color:#fff;background:var(--navy);border-radius:999px;padding:1px 7px;flex-shrink:0}
.vx-pill .vx-chev{width:7px;height:7px;border-right:1.5px solid var(--ink-3);border-bottom:1.5px solid var(--ink-3);transform:rotate(45deg) translateY(-2px);flex-shrink:0;margin-left:2px}
.vx-pill.ok .vx-dot{background:var(--ok)}.vx-pill.bad .vx-dot{background:var(--danger)}.vx-pill.ask .vx-dot{background:var(--warn)}.vx-pill.quiet .vx-dot{background:var(--ink-3)}.vx-pill.say .vx-dot{background:var(--cyan)}
.vx-pill.ask{border-color:rgba(217,119,6,.5);background:#fff8ec;color:#7a4b00}
.vx-pill-flash{box-shadow:0 0 0 3px rgba(52,128,195,.35)}
.vx-dot{width:8px;height:8px;border-radius:50%;background:var(--navy);flex-shrink:0}
.vx-strip.vx-drop{position:fixed;z-index:60;width:min(440px,calc(100vw - 16px));display:flex;flex-direction:column;gap:8px;padding:12px 14px;background:rgba(255,255,255,.96);backdrop-filter:var(--blur);border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 50px -14px rgba(15,25,55,.35),0 4px 14px rgba(15,25,55,.12);font-size:13px}
.vx-strip.vx-drop[hidden]{display:none}
.vx-drop-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.vx-drop-chips:empty{display:none}
.vx-drop-actions{border-top:1px solid var(--line-2);padding-top:8px;margin-top:2px}
.vx-heard{color:var(--ink-2);font-style:italic;white-space:normal;line-height:1.4}.vx-heard:empty{display:none}
.vx-did{color:var(--ink);font-weight:600;line-height:1.4}.vx-did.quiet{color:var(--ink-3);font-weight:400}.vx-did.ok{color:var(--ok)}.vx-did.bad{color:var(--danger)}.vx-did.ask{color:#7a4b00}.vx-did.say{color:var(--navy)}
.vx-sp{flex:1}
.vx-q{font-size:12px;color:var(--navy);background:rgba(48,120,192,.12);padding:4px 11px;border-radius:999px;cursor:pointer;border:0;font-family:inherit}.vx-strip .cal-btn.on{background:var(--brand-grad);color:#fff;border-color:transparent}
.vx-flash{box-shadow:0 0 0 3px rgba(52,128,195,.45)!important;transition:box-shadow .3s}
/* voice workspace: one master window, a tab per order / prescription */
.vx-ws{position:fixed!important;left:50%;top:64px;transform:translateX(-50%);width:min(1180px,94vw);height:min(86vh,900px);z-index:100;display:flex;flex-direction:column;background:rgba(255,255,255,.98);border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow-lg);overflow:hidden}
.vx-ws[hidden]{display:none!important}.vx-ws.min{height:44px}.vx-ws.min .vx-ws-b{display:none}
.vx-ws-h{display:flex;align-items:center;gap:10px;padding:6px 10px;border-bottom:1px solid var(--line-2);background:rgba(24,36,96,.04);flex-shrink:0}
.vx-ws-tabs{display:flex;gap:4px;flex:1;overflow-x:auto}.vx-ws-a{display:flex;gap:6px}
.vx-tab{display:inline-flex;align-items:center;gap:8px;font:inherit;font-size:12.5px;font-weight:600;color:var(--ink-2);background:transparent;border:1px solid transparent;border-radius:10px;padding:6px 10px;cursor:pointer;white-space:nowrap}
.vx-tab.on{background:#fff;color:var(--navy);border-color:var(--line);box-shadow:var(--shadow)}.vx-tab i{font-style:normal;color:var(--ink-3);padding:0 2px}.vx-tab i:hover{color:var(--danger)}
.vx-ws-b{flex:1;position:relative;overflow:hidden}
.vx-ws-b > .modal-overlay{position:absolute;inset:0;display:none;background:transparent;padding:0;align-items:stretch;justify-content:stretch}
.vx-ws-b > .modal-overlay.on{display:flex}
.vx-ws-b > .modal-overlay > .modal-card{width:100%!important;max-width:none!important;height:100%!important;max-height:none!important;margin:0;border-radius:0;box-shadow:none;resize:none}

/* inside the workspace a plain modal card (visit window etc.) is a column: head fixed, body scrolls, footer always reachable */
.vx-ws-b > .modal-overlay > .modal-card.cal-ev-card{display:flex;flex-direction:column;overflow:hidden}
.vx-ws-b > .modal-overlay > .modal-card.cal-ev-card > .modal-body{flex:1;min-height:0;overflow-y:auto}
.vx-ws-b > .modal-overlay > .modal-card.cal-ev-card > .modal-foot{flex-shrink:0}

/* process page dossier: each step shows what actually happened in it */
.pp-dos{display:flex;flex-direction:column;gap:10px}
.pp-sec2{background:rgba(255,255,255,.97);border:1px solid var(--line);border-radius:var(--r-card);padding:12px 16px;box-shadow:0 1px 2px rgba(24,36,96,.05)}
.pp-sec2.later{opacity:.72}.pp-sec2.now{border-color:#c2410c;box-shadow:0 0 0 3px rgba(194,65,12,.10)}
.pp-sec2-h{display:flex;align-items:center;gap:10px;margin-bottom:8px}.pp-sec2-h b{font-size:14.5px;color:var(--ink)}
.pp-n{width:22px;height:22px;border-radius:50%;background:var(--navy);color:#fff;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}.pp-sec2.later .pp-n{background:#cfd3dc}.pp-sec2.now .pp-n{background:#c2410c}
.pp-state{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-3)}.pp-sec2.done .pp-state{color:#15803d}.pp-sec2.now .pp-state{color:#c2410c}
.pp-kv{display:grid;grid-template-columns:130px 1fr;gap:4px 14px;font-size:var(--text-base)}.pp-k{color:var(--ink-3)}.pp-v{color:var(--ink)}
.pp-line{font-size:var(--text-base);color:var(--ink);padding:3px 0;border-top:1px dashed var(--line-2);margin-top:4px}.pp-line small{color:var(--ink-3);margin-left:6px}
.pp-flag{font-size:10px;font-weight:800;color:#b3261e;background:rgba(179,38,30,.08);padding:1px 6px;border-radius:999px}
.pp-doc{display:block;font-size:var(--text-base);color:var(--navy);text-decoration:none;padding:4px 0}.pp-doc small{color:var(--ink-3);margin-left:8px}.pp-docs2{margin-top:6px}
.pp-text{margin-top:8px}.pp-text-b{font-size:13px;line-height:1.5;color:var(--ink);max-height:120px;overflow:hidden;position:relative;white-space:normal;background:rgba(24,36,96,.03);padding:8px 10px;border-radius:8px}.pp-text.open .pp-text-b{max-height:none}.pp-text .cal-btn{margin-top:6px}
.pp-log summary{cursor:pointer;font-weight:600;color:var(--ink-2);font-size:13px}

/* Work section search */
.sp-search{padding:6px 12px 8px}.sp-search input{width:100%;font:inherit;font-size:13px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink)}.sp-search input:focus{outline:none;border-color:var(--navy);box-shadow:0 0 0 3px rgba(30,46,96,.12)}
.sp-pt-group{margin-bottom:14px}.sp-pt-h{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:6px 2px;font-size:14px}.sp-pt-h span{font-size:12px;color:var(--ink-3)}
.sp-stepline{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:var(--navy);padding:6px 2px 2px}.sp-stepline .late{color:#b3261e;font-weight:700}


/* the dossier over the chart: a column card whose body scrolls */
.modal-overlay > .modal-card.dossier-card{width:min(1180px,96vw)!important;max-width:none!important;display:flex!important;flex-direction:column!important;max-height:88vh;overflow:hidden!important}
.modal-overlay > .modal-card.dossier-card > .modal-head{flex-shrink:0;gap:10px}.dossier-card > .modal-head h2{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.modal-overlay > .modal-card.dossier-card > .dossier-host{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;display:block!important;padding:0!important}
.vx-ws-b > .modal-overlay > .modal-card.dossier-card{max-height:none}
.pp-in-modal{padding:12px 14px}.pp-in-modal .sp-left{position:sticky;top:0;align-self:flex-start}
.rec-proc{cursor:pointer}.rec-proc:hover .rt{color:var(--navy);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}

/* a folded chart card says so, and the fold handle is the chevron / title only */
#view-chart .card.collapsed > header::after{content:'folded — click the title to open';font-size:11px;font-weight:500;color:var(--ink-3);margin-left:auto}
#view-chart .card > header .card-chev, #view-chart .card > header h2{cursor:pointer}

/* Orders to sign: grouped, scannable, one click per order or per batch */
.os-list{display:flex;flex-direction:column;gap:14px;padding:12px 16px 4px}
.os-grp{background:rgba(255,255,255,.97);border:1px solid var(--line);border-radius:var(--r-card);box-shadow:0 1px 2px rgba(24,36,96,.05);overflow:hidden}
.os-grp-h{display:flex;align-items:center;gap:8px;padding:9px 14px;background:rgba(24,36,96,.035);border-bottom:1px solid var(--line-2);font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2)}
.os-grp-h b{font-weight:700;letter-spacing:.06em}.os-grp-h > span:not(.sp-sp){font-size:11px;font-weight:700;color:var(--navy);background:rgba(48,120,192,.12);padding:1px 8px;border-radius:999px;letter-spacing:0}
.os-grp-h i,.os-grp-h svg{width:14px;height:14px;color:var(--ink-3)}
.os-row{display:grid;grid-template-columns:18px 30px 1fr auto;gap:12px;align-items:center;padding:10px 14px;border-top:1px solid var(--line-2);cursor:pointer;transition:background .12s}
.os-row:first-of-type{border-top:0}.os-row:hover{background:rgba(48,120,192,.05)}.os-row.sel{background:rgba(30,46,96,.06)}
.os-ck{width:15px;height:15px;accent-color:var(--navy);margin:0;cursor:pointer}
.os-ic{width:30px;height:30px;border-radius:9px;background:rgba(24,36,96,.06);display:inline-flex;align-items:center;justify-content:center;color:var(--navy)}.os-ic svg{width:15px;height:15px}
.os-m{min-width:0;display:flex;flex-direction:column;gap:3px}
.os-t{font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.os-t b{font-weight:700}.os-sep{color:var(--ink-3);margin:0 6px}
.os-s{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:12px;color:var(--ink-3)}
.os-chip{font-size:11px;font-weight:600;color:var(--navy);background:rgba(48,120,192,.10);border-radius:999px;padding:1px 8px;white-space:nowrap}.os-chip em{font-style:normal;font-weight:500;color:var(--ink-2)}
.os-chip.os-why{background:rgba(21,128,61,.10);color:#15803d}
.os-desc{color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:380px}.os-when{color:var(--ink-3);margin-left:auto}
.os-a{display:flex;gap:6px;opacity:.85}.os-row:hover .os-a{opacity:1}
.cal-btn.ghost{background:transparent;border-color:transparent;color:var(--ink-2)}.cal-btn.ghost:hover{background:rgba(24,36,96,.06)}
.q-detail-head .sp-sp{flex:1}.q-detail-head .cal-btn{font-size:12px}

/* queue rows without a checkbox keep the grid aligned; abnormal / late chips */
.os-ck-ph{width:0}.os-row.late .os-ic{background:rgba(179,38,30,.10);color:#b3261e}
.os-chip.bad{background:rgba(179,38,30,.10);color:#b3261e}
.os-row .cal-btn.quiet{background:transparent;border-color:transparent;color:var(--ink-3)}.os-row .cal-btn.quiet:hover{background:rgba(24,36,96,.06);color:var(--ink)}
#qDetail .ops-stages{padding:10px 16px 0}

/* office messages, people picker, threads */
.msg-tabs{display:inline-flex;gap:2px;margin-left:10px;background:rgba(24,36,96,.06);border-radius:999px;padding:2px}.msg-tab{font:inherit;font-size:11.5px;font-weight:600;color:var(--ink-2);background:transparent;border:0;border-radius:999px;padding:3px 10px;cursor:pointer}.msg-tab.on{background:#fff;color:var(--navy);box-shadow:0 1px 2px rgba(24,36,96,.12)}
.msg-card{width:min(640px,94vw)!important}.msg-to{display:flex;align-items:center;gap:8px;margin-bottom:10px;flex-wrap:wrap}.msg-to .alg-lbl{min-width:52px}
.msg-chips{display:flex;gap:6px;flex-wrap:wrap}.msg-chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--navy);background:rgba(48,120,192,.12);border-radius:999px;padding:3px 10px}.msg-chip i{font-style:normal;cursor:pointer;color:var(--ink-3)}.msg-chip i:hover{color:#b3261e}.msg-none{font-size:12px;color:var(--ink-3)}
.pk-card{width:min(440px,94vw)!important}.pk-search{width:100%;font:inherit;font-size:13px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;margin-bottom:8px}
.pk-sec{font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);margin:10px 0 4px}
.pk-row{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:10px;cursor:pointer}.pk-row:hover{background:rgba(24,36,96,.05)}.pk-row input{accent-color:var(--navy)}
.pk-av{width:28px;height:28px;border-radius:50%;background:rgba(24,36,96,.08);color:var(--navy);font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}.pk-grp .pk-av{background:rgba(21,128,61,.10)}
.pk-m{display:flex;flex-direction:column;line-height:1.2}.pk-m b{font-size:13.5px}.pk-m small{font-size:11px;color:var(--ink-3)}.pk-count{font-size:12px;color:var(--ink-3)}
.th-list{display:flex;flex-direction:column;gap:10px}.th-msg{background:rgba(24,36,96,.04);border-radius:12px;padding:10px 14px}.th-reply{margin-left:22px;background:rgba(48,120,192,.07)}
.th-h{display:flex;gap:8px;align-items:baseline;font-size:12.5px;color:var(--ink-2)}.th-h b{color:var(--ink)}.th-when{margin-left:auto;color:var(--ink-3);font-size:11.5px}.th-b{margin-top:4px;font-size:13.5px;white-space:pre-wrap}

/* fax card: attachments row */
.fx-att{display:flex;align-items:flex-start;gap:10px;padding:8px 0 10px;border-bottom:1px solid var(--line-2);margin-bottom:10px;flex-wrap:wrap}.fx-att .alg-lbl{padding-top:3px}
.fx-att-list{display:flex;flex-wrap:wrap;gap:6px 10px}.fx-ck{font-size:12px;color:var(--ink-2);display:inline-flex;align-items:center;gap:5px;background:rgba(24,36,96,.05);border-radius:999px;padding:3px 10px;cursor:pointer}.fx-ck input{accent-color:var(--navy);margin:0}

/* patient messages — a conversation window */
.modal-overlay > .modal-card.chat-card{width:min(980px,96vw)!important;max-width:none!important;height:min(86vh,820px);display:flex!important;flex-direction:column!important;overflow:hidden!important}
.chat-card > .modal-head{flex-shrink:0;gap:10px}.chat-card > .modal-head h2{flex:1}
.chat-body{flex:1;min-height:0;display:grid;grid-template-columns:300px 1fr}
.chat-list{border-right:1px solid var(--line-2);overflow-y:auto;padding:8px}
.chat-sec{font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);padding:8px 8px 4px}.chat-none{font-size:12.5px;color:var(--ink-3);padding:6px 10px}
.chat-item{all:unset;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;width:100%;box-sizing:border-box;padding:9px 10px;border-radius:12px;cursor:pointer}
.chat-item:hover{background:rgba(24,36,96,.05)}.chat-item.on{background:rgba(48,120,192,.12)}.chat-item.done{opacity:.6}
.chat-avs{display:flex}.chat-av{width:28px;height:28px;border-radius:50%;background:rgba(24,36,96,.10);color:var(--navy);font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;border:2px solid #fff;margin-left:-6px}.chat-avs .chat-av:first-child{margin-left:0}
.chat-item-m{min-width:0;display:flex;flex-direction:column;gap:2px}.chat-item-t{font-size:13.5px;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-item-s{font-size:12px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-item-r{display:flex;flex-direction:column;align-items:flex-end;gap:3px}.chat-when{font-size:10.5px;color:var(--ink-3)}.chat-n{font-size:10px;font-weight:700;color:#fff;background:var(--navy);border-radius:999px;padding:1px 6px}
.chat-urg{display:inline-flex;width:14px;height:14px;border-radius:50%;background:#b3261e;color:#fff;font-size:10px;font-weight:800;align-items:center;justify-content:center;margin-right:6px;font-style:normal}.chat-urg-t{color:#b3261e;font-style:normal;font-weight:700}
.chat-thread{display:flex;flex-direction:column;min-height:0}
.chat-head{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line-2)}.chat-head-m{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.chat-head-m b{font-size:15px}.chat-head-m span{font-size:12px;color:var(--ink-3)}.chat-head-a{display:flex;gap:6px}
.chat-msgs{flex:1;min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:rgba(24,36,96,.025)}.chat-msgs-empty{align-items:center;justify-content:center}
.chat-empty{font-size:13px;color:var(--ink-3);text-align:center;padding:30px}
.chat-msg{display:flex;gap:8px;align-items:flex-end;max-width:78%}.chat-msg.mine{align-self:flex-end;flex-direction:row-reverse}
.chat-bub{background:#fff;border:1px solid var(--line);border-radius:14px 14px 14px 4px;padding:8px 12px;box-shadow:0 1px 2px rgba(24,36,96,.06)}.chat-msg.mine .chat-bub{background:var(--navy);color:#fff;border-color:transparent;border-radius:14px 14px 4px 14px}
.chat-meta{font-size:10.5px;color:var(--ink-3);margin-bottom:3px}.chat-msg.mine .chat-meta{color:rgba(255,255,255,.7)}.chat-text{font-size:13.5px;line-height:1.45;white-space:pre-wrap;word-break:break-word}
.chat-compose{border-top:1px solid var(--line-2);padding:10px 14px 12px;display:flex;flex-direction:column;gap:8px;background:#fff}
.chat-subj{font:inherit;font-size:13.5px;font-weight:600;border:0;border-bottom:1px solid var(--line);padding:6px 2px;outline:none}.chat-subj:focus{border-color:var(--navy)}
.chat-to{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.chat-urgent{margin-left:auto;font-size:12px;color:var(--ink-2);display:inline-flex;align-items:center;gap:5px}.chat-urgent input{accent-color:#b3261e}
.chat-row{display:flex;gap:8px;align-items:flex-end}.chat-row textarea{flex:1;font:inherit;font-size:13.5px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;resize:none;min-height:42px}.chat-row textarea:focus{outline:none;border-color:var(--navy);box-shadow:0 0 0 3px rgba(30,46,96,.12)}
@media (max-width:760px){.chat-body{grid-template-columns:1fr}.chat-list{display:none}}

/* what WellPlus read in a message — the same plan Tell WellPlus shows, under the bubble */
.chat-plan{margin-top:8px;background:rgba(255,255,255,.92);border:1px solid rgba(48,120,192,.25);border-radius:10px;padding:8px 10px;color:var(--ink);font-size:12.5px}
.chat-msg.mine .chat-plan{color:var(--ink)}.chat-plan-h{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.chat-plan-w{font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--cyan-text,#1f6fb2)}.chat-plan-done{font-size:10.5px;font-weight:700;color:#15803d;text-transform:uppercase}
.chat-plan-l{padding:2px 0}.chat-plan-l b{color:var(--navy);margin-right:4px}.chat-plan-l em{color:#b3261e;font-style:normal;font-size:11px}
.chat-plan .cal-btn{margin-top:6px}
.chat-plan-l.has-open{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.chat-plan-open{margin-left:auto;font:inherit;font-size:11.5px;font-weight:700;color:var(--cyan-text);background:transparent;border:1px solid rgba(48,120,192,.35);border-radius:999px;padding:2px 9px;cursor:pointer}.chat-plan-open:hover{background:rgba(48,120,192,.12)}

/* draggable divider for two-panel windows */
.wp-vsplit{width:6px;cursor:col-resize;border-radius:3px;background:transparent;position:relative;align-self:stretch;margin:0 5px}
.wp-vsplit::after{content:'';position:absolute;left:2px;top:0;bottom:0;width:2px;border-radius:2px;background:rgba(24,36,96,.10)}
.wp-vsplit:hover::after{background:var(--navy);left:1px;width:4px}
.modal-card.fx-card, .modal-card.chat-card, .modal-card.dossier-card{position:relative}

/* orders riding with a visit; send-later control */
.vis-orders{display:flex;flex-direction:column;gap:2px}.vis-order{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;padding:5px 8px;border-radius:8px;font-size:12.5px}.vis-order:hover{background:rgba(24,36,96,.04)}
.vis-order-t{min-width:0;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.vis-order-t b{color:var(--navy)}.vis-order-s{color:var(--ink-3);font-size:11.5px}.vis-order-s b{color:var(--ink-2);font-weight:600}.vis-ok{color:#1d6b3a;font-weight:600}
.vis-more{font:inherit;font-size:14px;line-height:1;color:var(--ink-3);background:transparent;border:1px solid transparent;border-radius:7px;width:26px;height:24px;cursor:pointer}.vis-more:hover{background:#fff;border-color:var(--line);color:var(--navy)}
.vis-order-a{grid-column:1/-1;display:flex;gap:6px;padding:2px 0 4px 2px}.vis-order-hint{font-size:11.5px;color:var(--ink-3);line-height:1.4;padding:2px 8px 6px}.vis-order-hint b{color:var(--ink-2)}
.chat-later{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--ink-2);margin-left:8px}.chat-later input{font:inherit;font-size:12px;border:1px solid var(--line);border-radius:8px;padding:2px 6px}

/* referral composer: guide rows and selected cart row */
.cpoe-guiderow{all:unset;display:flex;justify-content:space-between;gap:10px;padding:7px 10px;border:1px solid var(--line);border-radius:10px;cursor:pointer;font-size:12.5px}.cpoe-guiderow:hover{background:rgba(48,120,192,.06)}.cpoe-guiderow span{color:var(--ink-3);font-size:11.5px}
.cpoe-row.on{outline:2px solid rgba(48,120,192,.35);outline-offset:-2px;border-radius:10px}
.cpoe-sugrow.on{background:rgba(48,120,192,.12)}

/* diagnosis navigator inside a narrow rail (order composers): line 1 = code · HCC · RAF · star, line 2 = the full description */
.cpoe-right .dxs-results .dx-res, .rxp-ctx .dxs-results .dx-res{display:grid;grid-template-columns:auto auto auto 1fr auto;grid-auto-rows:auto;column-gap:6px;row-gap:3px;align-items:center;padding:7px 10px}
.cpoe-right .dxs-results .dx-res-code, .rxp-ctx .dxs-results .dx-res-code{grid-row:1;grid-column:1;min-width:0;font-size:12px}
.cpoe-right .dxs-results .dx-res-desc, .rxp-ctx .dxs-results .dx-res-desc{grid-row:2;grid-column:1/-1;font-size:12px;line-height:1.35;white-space:normal;padding-right:6px}
.cpoe-right .dxs-results .dx-res > .chip, .rxp-ctx .dxs-results .dx-res > .chip{grid-row:1;font-size:9.5px;padding:1px 6px;line-height:1.5;margin:0}
.cpoe-right .dxs-results .dx-res > .dx-star, .rxp-ctx .dxs-results .dx-res > .dx-star{grid-row:1;grid-column:5;justify-self:end;margin:0}
.cpoe-right .dxs-results .dx-unspec, .cpoe-right .dxs-results .dx-specify, .cpoe-right .dxs-results .dx-cat-n, .rxp-ctx .dxs-results .dx-unspec, .rxp-ctx .dxs-results .dx-specify{display:inline-block;margin:2px 4px 0 0;font-size:10px;padding:1px 6px;white-space:nowrap}
.cpoe-right .dxs-results{max-height:280px;overflow-y:auto}

/* per-study facility on an imaging cart row */
.row-fac{display:block;margin-top:4px;font-size:11.5px;color:var(--ink-2)}.row-fac b{color:var(--navy)}.row-fac .row-dxadd{margin-left:4px}

/* a message that has not gone out yet: send it now or take it back */
.chat-sched-a{display:flex;gap:6px;margin-top:6px}.chat-sched-a button{font:inherit;font-size:11px;font-weight:700;padding:3px 9px;border-radius:999px;border:1px solid rgba(255,255,255,.45);background:rgba(255,255,255,.14);color:#fff;cursor:pointer}.chat-sched-a button:hover{background:rgba(255,255,255,.26)}
.chat-msg:not(.mine) .chat-sched-a button{border-color:var(--line);background:#fff;color:var(--navy)}

/* ── the EMR's own confirm sheet ── */
.wpc-ov{position:fixed;inset:0;z-index:12000;display:flex;align-items:center;justify-content:center;background:rgba(20,28,58,.28);backdrop-filter:blur(3px);opacity:0;transition:opacity .14s}
.wpc-ov.in{opacity:1}.wpc-ov.out{opacity:0}
.wpc{width:min(420px,calc(100vw - 32px));background:#fbfcff;border-radius:16px;padding:22px 22px 18px;box-shadow:0 30px 90px -14px rgba(15,25,55,.5),0 8px 24px rgba(15,25,55,.25);transform:translateY(8px) scale(.98);transition:transform .16s cubic-bezier(.16,1,.3,1)}
.wpc-ov.in .wpc{transform:none}
.wpc-t{font-size:15.5px;font-weight:700;color:var(--navy);line-height:1.35;text-wrap:balance}
.wpc-d{font-size:13px;color:var(--ink-2,#4d5670);line-height:1.5;margin-top:8px}
.wpc-a{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.wpc-a .cal-btn{padding:8px 16px}
.wpc-a .cal-btn.danger{background:var(--danger,#e5484d);color:#fff;border-color:transparent;box-shadow:0 4px 14px rgba(229,72,77,.3)}

/* ── Letters: ask on the left, the letter on letterhead on the right ── */
.letter-card{width:1180px}
.lt-body{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:350px 6px minmax(0,1fr);gap:0}
.lt-left{min-height:0;overflow-y:auto;padding:14px 16px;display:flex;flex-direction:column;gap:12px;background:rgba(24,36,96,.015);border-right:1px solid var(--line-2)}
.lt-right{min-height:0;overflow-y:auto;padding:16px 22px 26px;background:linear-gradient(180deg,#e9edf3 0%,#e3e8f0 100%)}
.lt-askrow{display:flex;gap:8px;align-items:stretch}
.lt-ask{flex:1;font:inherit;font-size:13.5px;line-height:1.45;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fff;resize:vertical;min-height:58px;transition:border-color .12s,box-shadow .12s}
.lt-ask:focus{outline:none;border-color:var(--navy);box-shadow:0 0 0 3px rgba(27,43,91,.08)}
.lt-draftbtn{align-self:stretch;padding:0 14px;white-space:nowrap}
.lt-spin{display:inline-block;width:12px;height:12px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:ltspin .7s linear infinite;vertical-align:-2px}
@keyframes ltspin{to{transform:rotate(360deg)}}
.lt-needs{font-size:12px;color:#7a4b00;background:#fff7e6;border:1px solid #f3d9a4;border-radius:10px;padding:7px 10px;line-height:1.45}
.lt-kgroup{margin-bottom:8px}.lt-kg{font-size:10px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;color:var(--ink-3);margin:2px 0 5px}
.lt-kchips{display:flex;flex-wrap:wrap;gap:5px}.lt-kchips .dx-chip{display:inline-flex;width:auto;flex:0 0 auto;max-width:100%;white-space:nowrap;text-align:left}
.lt-f{display:flex;flex-direction:column;gap:4px}.lt-f>span{font-size:10px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;color:var(--ink-3)}
.lt-2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.lt-chips{display:flex;flex-wrap:wrap;gap:5px}.lt-chips:empty{display:none}
.lt-chip{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;color:var(--navy);background:#fff;border:1px solid var(--line);border-radius:999px;padding:3px 6px 3px 10px}
.lt-chip button{font:inherit;font-size:10px;border:none;background:rgba(24,36,96,.08);color:var(--ink-2);border-radius:50%;width:16px;height:16px;cursor:pointer;line-height:1}
.lt-attn{border-color:#e2a93b!important;box-shadow:0 0 0 3px rgba(226,169,59,.15)!important}
.lt-status{display:flex;align-items:center;gap:8px;margin:0 auto 10px;max-width:760px;min-height:20px}
.lt-pill{font-size:10.5px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;color:var(--ink-2);background:#fff;border:1px solid var(--line);border-radius:999px;padding:3px 9px}
.lt-pill.signed{color:#1d6b3a;background:#eefaf0;border-color:#9ad4ae}
.lt-src{font-size:11.5px;color:var(--ink-3)}
.lt-page{max-width:760px;margin:0 auto;transition:opacity .15s}.lt-page.busy{opacity:.45;pointer-events:none}
.lt-empty{color:var(--ink-3);font-size:13px;text-align:center;padding:60px 30px;background:#fff;border-radius:6px;box-shadow:0 1px 3px rgba(15,25,55,.08),0 14px 40px -12px rgba(15,25,55,.25)}
.lt-sheet{background:#fff;color:#14213d;padding:46px 54px 40px;min-height:820px;border-radius:4px;box-shadow:0 1px 3px rgba(15,25,55,.10),0 18px 50px -14px rgba(15,25,55,.35);font-size:13px;line-height:1.7}
.lt-lh{display:flex;align-items:center;gap:14px;border-bottom:3px solid #1B2B5B;padding-bottom:12px;margin-bottom:22px}
.lt-lh img{height:56px;width:auto}.lt-lh-t{display:flex;flex-direction:column;gap:3px}.lt-lh-t span{display:block;font-size:10.5px;color:#555;line-height:1.5}.lt-lh-t span b{display:inline-block;min-width:74px;font-size:9.5px;font-weight:800;letter-spacing:.7px;text-transform:uppercase;color:#1B2B5B;margin-right:8px}
.lt-title{font-size:14px;font-weight:800;color:#1B2B5B;text-transform:uppercase;letter-spacing:.7px;margin-bottom:14px}
.lt-date{margin-bottom:14px}.lt-to{white-space:pre-line;margin-bottom:12px}.lt-re{font-weight:700;margin-bottom:14px}.lt-sal{margin-bottom:10px}
.lt-text p{margin:0 0 11px}.lt-text p:last-child{margin-bottom:0}
.lt-close{margin-top:20px}.lt-sig{margin-top:6px;font-size:12px;line-height:1.5}.lt-sig b{display:block;font-size:13px}
.lt-sigline{height:36px;border-bottom:1px solid #14213d;width:240px;margin-bottom:6px}.lt-sigline.signed{height:auto;border:none;font-size:11px;font-style:italic;color:#345;margin:10px 0 6px}
.lt-es{margin-top:22px;border-top:1px dashed #b9c1cc;padding-top:14px}.lt-es-h{font-size:10px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;color:#667;margin-bottom:8px}
.lt-foot{font-size:9.5px;color:#667;margin-top:34px;border-top:1px solid #dde3ea;padding-top:6px}
.lt-sheet [contenteditable]{border-radius:3px;transition:box-shadow .12s}.lt-sheet [contenteditable]:hover{box-shadow:0 0 0 1px rgba(48,120,192,.25)}.lt-sheet [contenteditable]:focus{outline:none;box-shadow:0 0 0 2px rgba(48,120,192,.45);background:#fbfdff}
.lt-gap{background:#fff1c2;border-bottom:2px solid #e2a93b;padding:0 4px;border-radius:3px;font-weight:700;color:#7a4b00}
.lt-prior{flex:1 1 auto;min-height:0;overflow-y:auto;padding:14px 18px}
.lt-plist{display:flex;flex-direction:column;gap:6px;max-width:900px;margin:0 auto}
.lt-prow{display:grid;grid-template-columns:minmax(0,1fr) auto 22px;gap:12px;align-items:center;text-align:left;font:inherit;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 14px;cursor:pointer}
.lt-prow:hover{border-color:var(--cyan);box-shadow:var(--shadow)}
.lt-prow-m b{display:block;font-size:13.5px;color:var(--navy)}.lt-prow-m span{display:block;font-size:12px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lt-prow-r{display:flex;flex-direction:column;align-items:flex-end;gap:3px}.lt-when{font-size:11px;color:var(--ink-3)}
.lt-prow i{font-style:normal;color:var(--ink-3);font-size:12px;text-align:center}.lt-prow i:hover{color:var(--danger)}
.lt-n{font-size:10px;background:rgba(24,36,96,.08);border-radius:999px;padding:1px 6px;margin-left:4px}.lt-n:empty{display:none}
.vx-ws .letter-card{width:auto;height:auto}

/* office messages on Home: the same chat, inline */
.chat-inline{display:block}
.chat-inline .chat-card.inline{width:100%;max-width:none;height:calc(100vh - 150px);min-height:520px;display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}
.chat-box{width:auto;margin-right:4px}.chat-box .seg2-b{padding:5px 14px}
.chat-pt{color:var(--navy);font-weight:700}
.chat-ptlink{font:inherit;font-size:inherit;font-weight:700;color:var(--cyan-text);background:transparent;border:0;padding:0;cursor:pointer}.chat-ptlink:hover{text-decoration:underline}
.chat-ptrow{align-items:center}.chat-pta{flex:1;min-width:160px}.chat-pta input{width:100%;font:inherit;font-size:12.5px;padding:6px 10px;border:1px solid var(--line);border-radius:10px}

/* ── Notes hub ── */
.notes-card{width:1040px}
.nb-tools{display:flex;align-items:center;gap:14px;padding:12px 18px;border-bottom:1px solid var(--line-2);background:rgba(24,36,96,.015)}
.nb-new{display:flex;gap:8px;flex:1 1 auto;min-width:0}
.nb-newbtn{display:flex;align-items:center;gap:10px;flex:1 1 0;min-width:0;text-align:left;font:inherit;background:#fff;border:1px solid var(--line);border-radius:14px;padding:9px 12px;cursor:pointer;transition:box-shadow .12s,border-color .12s,transform .12s}
.nb-newbtn:hover{border-color:var(--cyan);box-shadow:var(--shadow);transform:translateY(-1px)}
.nb-newbtn svg{width:18px;height:18px;color:var(--navy);flex-shrink:0}
.nb-newbtn span{min-width:0}.nb-newbtn b{display:block;font-size:13px;color:var(--navy)}.nb-newbtn small{display:block;font-size:11px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nb-search{width:220px;flex:0 0 auto}
.nb-list{flex:1 1 auto;min-height:0;overflow-y:auto;padding:6px 18px 14px}
.nb-month{font-size:10.5px;font-weight:800;letter-spacing:.7px;text-transform:uppercase;color:var(--ink-3);margin:14px 0 6px;padding-left:2px}
.nb-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:10px 12px;border:1px solid transparent;border-radius:14px;cursor:pointer}
.nb-row:hover{background:#fff;border-color:var(--line);box-shadow:var(--shadow)}
.nb-ic{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:rgba(24,36,96,.06);color:var(--navy)}.nb-ic svg{width:16px;height:16px}
.nb-row.k-phone .nb-ic{background:#eaf5ee;color:#1d6b3a}.nb-row.k-quick .nb-ic{background:#fff6e0;color:#8a5a00}
.nb-t{font-size:13.5px;color:var(--ink)}.nb-t b{color:var(--navy)}.nb-s{font-size:12.5px;color:var(--ink-2);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nb-chip{font-size:10.5px;font-weight:700;color:var(--ink-2);background:rgba(24,36,96,.07);border-radius:999px;padding:1px 7px;margin-left:2px;vertical-align:1px}
.nb-acts{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}.nb-act{font-size:11px;color:#1d6b3a;background:#eefaf0;border:1px solid #bfe3c9;border-radius:999px;padding:1px 8px;max-width:360px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nb-act.off{color:var(--ink-3);background:#f3f4f6;border-color:var(--line)}
.nb-r{display:flex;flex-direction:column;align-items:flex-end;gap:3px}.nb-by{font-size:11px;color:var(--ink-3)}
.nb-pill{font-size:10px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;color:#8a5a00;background:#fff6e0;border-radius:999px;padding:2px 8px}.nb-pill.signed{color:#1d6b3a;background:#eefaf0}
.nb-actions{display:flex;gap:6px}
.nb-empty{text-align:center;padding:60px 20px;color:var(--ink-3)}.nb-empty b{display:block;font-size:15px;color:var(--ink);margin-bottom:4px}
/* ── quick note / phone call ── */
.modal-overlay > .modal-card.qn-card{width:min(620px,96vw);display:flex;flex-direction:column;max-height:90vh}
.qn-card .modal-head{gap:10px}.qn-card .modal-head h2{flex:0 0 auto}.qn-kind{width:auto;margin-left:4px}.qn-kind .seg2-b{padding:5px 12px}.qn-card .cpoe-pt{margin-left:auto}
.qn-body{flex:1 1 auto;min-height:0;overflow-y:auto;padding:14px 18px;display:flex;flex-direction:column;gap:12px}
.qn-row{display:flex;flex-direction:column;gap:6px}.qn-row .alg-lbl{font-size:10px;font-weight:800;letter-spacing:.7px;text-transform:uppercase;color:var(--ink-3)}
.qn-chips{display:flex;flex-wrap:wrap;gap:5px}.qn-who{margin-top:2px}
.qn-textwrap{position:relative}.qn-text{width:100%;box-sizing:border-box;font:inherit;font-size:13.5px;line-height:1.5;padding:10px 12px;padding-right:96px;border:1px solid var(--line);border-radius:12px;background:#fff;resize:vertical;min-height:96px}
.qn-text:focus{outline:none;border-color:var(--navy);box-shadow:0 0 0 3px rgba(27,43,91,.08)}
.qn-mic{position:absolute;right:8px;top:8px;display:inline-flex;align-items:center;gap:5px;font:inherit;font-size:11.5px;font-weight:700;color:var(--navy);background:#fff;border:1px solid var(--line);border-radius:999px;padding:4px 10px;cursor:pointer}.qn-mic svg{width:13px;height:13px}
.qn-mic.on{background:var(--brand-grad);color:#fff;border-color:transparent;animation:vxpulse 1.4s ease-in-out infinite}
.qn-askrow{flex-direction:row;align-items:center;gap:10px}.qn-askhint{font-size:11.5px;color:var(--ink-3);line-height:1.4}
.qn-plan{background:rgba(255,255,255,.92);border:1px solid rgba(48,120,192,.25);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:6px}
.qn-plan-h{font-size:11px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;color:var(--navy);display:flex;justify-content:space-between}.qn-done{color:#1d6b3a}
.qn-step{display:flex;gap:8px;align-items:flex-start;font-size:13px;color:var(--ink);cursor:pointer}.qn-step input{margin-top:3px}.qn-step b{color:var(--navy);margin-right:4px}.qn-step em{color:#b3261e;font-style:normal;font-size:11px}.qn-step.off{color:var(--ink-3)}
.qn-plan-a{display:flex;align-items:center;gap:10px;margin-top:4px}
.qn-addenda{border-top:1px dashed var(--line);padding-top:10px}.qn-addtext{font-size:13px;white-space:pre-wrap;color:var(--ink-2)}
.qn-status{font-size:12px;color:var(--ink-3)}
.qn-chips .dx-chip,.nb-row .dx-chip{display:inline-flex;width:auto;flex:0 0 auto;white-space:nowrap}

/* notes hub rows: icon | text | who/when | status | actions */
.nb-row{grid-template-columns:34px minmax(0,1fr) 120px 74px auto}
.nb-meta{display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-size:11px;color:var(--ink-3);white-space:nowrap}.nb-meta .nb-by{color:var(--ink-2);font-weight:600}
.nb-pill{justify-self:center;text-align:center}.nb-pill.outside{color:#1b5fae;background:#eaf3fc}
.nb-row.k-ma .nb-ic{background:#eef3ff;color:#3b4fa0}.nb-row.k-outside .nb-ic{background:#eaf3fc;color:#1b5fae}
.nb-act.code{color:#3b4fa0;background:#eef3ff;border-color:#c9d4f5;font-variant-numeric:tabular-nums}.nb-act.sent{color:#1b5fae;background:#eaf3fc;border-color:#bdd7f3}
.nb-actions .cal-btn svg{width:13px;height:13px}
.nb-newbtn{padding:8px 10px}.nb-newbtn b{font-size:12.5px}
/* MA note */
.modal-overlay > .modal-card.ma-card{width:min(760px,96vw)}
.ma-group{margin-bottom:6px}.ma-g{font-size:10px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;color:var(--ink-3);margin:4px 0 4px}
.ma-fgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 10px}.ma-fgrid .lt-f{min-width:0}.ma-fgrid .lt-f.num{max-width:120px}
.ma-fgrid .cpoe-in{width:100%;box-sizing:border-box}
.qn-chips .dx-chip svg{width:12px;height:12px;margin-right:4px;vertical-align:-2px}
.qn-notify .alg-lbl small,.qn-row .alg-lbl small{font-weight:500;letter-spacing:0;text-transform:none;color:var(--ink-3);margin-left:6px}
.qn-notifyrow{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

/* in-house stock */
.inv-wrap{display:flex;flex-direction:column;gap:12px}.inv-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.inv-head h2{font-size:18px;color:var(--navy);margin:0 0 4px}.inv-head .sub{font-size:12.5px;color:var(--ink-2);max-width:640px}
.inv-flags{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.inv-flag{font-size:11px;font-weight:700;border-radius:999px;padding:3px 9px;background:#eef3ff;color:#3b4fa0}.inv-flag.low{background:#fff6e0;color:#8a5a00}.inv-flag.soon{background:#fff6e0;color:#8a5a00}.inv-flag.bad{background:#fdecec;color:#b3261e}
.inv-tools{display:flex;align-items:center;gap:12px}.inv-tools .cpoe-in{width:260px}
.inv-form{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px}.inv-form-g{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.inv-form-a{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px}
.inv-item{background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 14px}.inv-item-h{display:flex;align-items:center;gap:8px;margin-bottom:6px}.inv-item-h b{font-size:14px;color:var(--navy)}.inv-kind{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--ink-3)}.inv-total{margin-left:auto;font-size:12.5px;color:var(--ink-2)}
.inv-t{width:100%;border-collapse:collapse;font-size:12.5px}.inv-t th{text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.6px;color:var(--ink-3);padding:4px 8px;border-bottom:1px solid var(--line-2)}.inv-t td{padding:6px 8px;border-bottom:1px solid var(--line-2);vertical-align:middle}
.inv-t tr.retired{opacity:.5}.inv-t tr.expired td:nth-child(2){color:#b3261e}.inv-t tr.soon td:nth-child(2){color:#8a5a00}.inv-t tr.low td:nth-child(4){color:#8a5a00}.inv-t em{font-style:normal;font-size:10.5px;font-weight:700}
.inv-acts{display:flex;gap:4px;justify-content:flex-end}
.ma-from{background:rgba(24,36,96,.03);border:1px dashed var(--line);border-radius:12px;padding:8px 10px}
.ma-export{font-size:12.5px;align-items:flex-start}.ma-export small{color:var(--ink-3);font-weight:400}

.ma-n{font-size:9.5px;font-weight:800;margin-left:5px;color:#1d6b3a}
.ma-block{border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:#fff;margin-bottom:8px}
.ma-block-h{display:flex;align-items:center;gap:8px;margin-bottom:8px}.ma-block-h svg{width:15px;height:15px;color:var(--navy)}.ma-block-h b{font-size:13px;color:var(--navy);flex:1}
.ma-block .ma-from{margin-bottom:8px}
.ma-fromline{font-size:12.5px;color:var(--ink-2);line-height:1.5}.ma-fromline b{color:var(--navy)}.ma-fromline .lnk-btn{margin-left:6px}

/* procedure templates in the note drawer */
.pp-pick .cpoe-in{width:100%;box-sizing:border-box;margin-bottom:8px}
.pp-form{display:flex;flex-direction:column;gap:10px}.pp-h{display:flex;align-items:center;gap:10px}.pp-h b{font-size:13.5px;color:var(--navy)}
.pp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.pp-form .qn-text{width:100%;box-sizing:border-box;padding-right:12px}
.pp-a{display:flex;justify-content:flex-end;gap:8px}
/* the chart drawer as a tab of the right rail */
.nt-rail{min-height:0;overflow:hidden}
.nt-railtabs{display:flex;gap:4px;background:var(--bg,#eef2f4);border-radius:9px;padding:2px;flex-shrink:0}
.nt-railtab{flex:1;font:inherit;font-size:11.5px;font-weight:700;padding:5px 8px;border:0;border-radius:7px;background:transparent;color:var(--ink-3);cursor:pointer}.nt-railtab.on{background:#fff;color:var(--navy);box-shadow:0 1px 3px rgba(24,36,96,.12)}
.nt-rail.drawer-on > .cpoe-sec{display:none}
.nt-rail > .nt-cdrawer{position:static;width:auto;min-width:0;min-height:0;flex:1 1 auto;box-shadow:none;border:1px solid #e5e8ef;border-radius:12px;z-index:auto;overflow:hidden;display:flex;flex-direction:column}
.nt-rail > .nt-cdrawer .cd-h{flex-wrap:wrap;padding:8px 10px;font-size:12px}.nt-rail > .nt-cdrawer .cd-h > .np-hint{display:none}.nt-rail > .nt-cdrawer .cd-tabs{margin-left:0;width:100%;order:3}.nt-rail > .nt-cdrawer .cd-body{min-height:0;padding:8px 10px}
.nt-rail > .nt-cdrawer .pp-grid{grid-template-columns:1fr}
/* the paper fills its column — no frame around the note */
.nt-paperwrap{padding:6px 8px 12px}
.nt-paper{max-width:none;padding:16px 22px 26px;border-radius:6px}
.nt-rail > .nt-cdrawer .cd-tabs{flex-wrap:wrap;gap:4px}.nt-rail > .nt-cdrawer .cd-tab{font-size:10.5px;padding:3px 8px}.nt-rail > .nt-cdrawer .cd-h [data-cdx]{display:none}
.np-bf-col .np-bf-fold{display:none}.np-bf-col.unfold .np-bf-fold{display:flex}
.np-bf-l.due .np-bf-a { margin-top: 3px; }

/* the brief: one strip, the four columns one tap away */
.np-brief { padding: 0; gap: 0; overflow: hidden; }
.np-bf-strip { display: flex; align-items: center; gap: 12px; padding: 8px 12px; cursor: pointer; font-size: 12px; color: #2b3550; }
.np-bf-strip:hover { background: rgba(24,36,96,.03); }
.np-bf-strip-t { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-bf-strip-t b { color: #1B2B5B; }
.np-bf-strip-t i { font-style: normal; color: #6b7590; }
.np-bf-strip-a { display: flex; gap: 6px; flex-shrink: 0; }
.np-bf-body { display: none; border-top: 1px solid #e8edf6; padding: 6px 6px 8px; }
.np-brief.open .np-bf-body { display: block; }

/* new results: red until the physician marks them reviewed; then they sit in Data reviewed */
.lab-ph-r{display:flex;align-items:center;gap:6px}
.lab-pill.new{background:var(--danger-bg);color:var(--danger-text);animation:vxpulse 1.6s ease-in-out 3}
.lab-pill.done{background:rgba(44,122,75,.12);color:#2c7a4b}
.lab-panel.is-new{border-color:rgba(229,72,77,.45);box-shadow:inset 3px 0 0 var(--danger)}
.lab-rev{font:inherit;font-size:10.5px;font-weight:700;padding:1px 8px;border-radius:999px;border:1px solid rgba(229,72,77,.4);background:#fff;color:var(--danger-text);cursor:pointer}.lab-rev:hover{background:var(--danger);color:#fff;border-color:var(--danger)}
.np-panel.unrev{border-left:3px solid var(--danger);padding-left:6px;border-radius:2px}.np-panel.rev{border-left:3px solid #2c7a4b;padding-left:6px;border-radius:2px}
.np-rev{font-size:10px;font-weight:800;letter-spacing:.3px;text-transform:uppercase;border-radius:999px;padding:1px 7px;margin-right:4px}.np-rev.ok{background:rgba(44,122,75,.12);color:#2c7a4b}.np-rev.todo{font:inherit;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.3px;background:var(--danger-bg);color:var(--danger-text);border:1px solid rgba(229,72,77,.35);cursor:pointer}.np-rev.todo:hover{background:var(--danger);color:#fff}
.nt-newbadge{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 5px;margin-left:6px;border-radius:999px;background:var(--danger);color:#fff;font-size:10px;font-weight:800;font-style:normal;vertical-align:middle}
.nt-actbtn{position:relative}.nt-newbadge.abs{position:absolute;top:-5px;right:-5px;margin:0}
.dg-study.is-new{border-left-color:var(--danger);background:rgba(229,72,77,.04)}.dg-t .lab-ph-r{display:inline-flex;margin-left:6px;vertical-align:middle}
.np-report.unrev{border-left:3px solid var(--danger);padding-left:6px}.np-report.rev{border-left:3px solid #2c7a4b;padding-left:6px}

/* attention orange — the complement to the navy; red stays for critical results */
:root { --attn: #D97757; --attn-text: #A64B2A; --attn-bg: rgba(217,119,87,.14); --attn-border: rgba(217,119,87,.45); --attn-deep: #B3541E; }
.card > header .count.attn { color: #fff; background: var(--attn); padding: 1px 8px; border-radius: 999px; font-size: 10.5px; }
.card > header .count.attn-severe { background: var(--attn-deep); animation: attnpulse 1.4s ease-in-out 3; }
.card > header .count.ok { color: var(--ok-text); background: var(--ok-bg); padding: 1px 8px; border-radius: 999px; font-size: 10.5px; }
@keyframes attnpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(179,84,30,.45); } 50% { box-shadow: 0 0 0 6px rgba(179,84,30,0); } }
.card.card-attn { box-shadow: inset 3px 0 0 var(--attn-deep); }
.alg-item.sev-severe { box-shadow: inset 3px 0 0 var(--attn-deep); }
.alg-sev.severe { color: var(--attn-text); background: var(--attn-bg); }
.alg-sev.moderate { color: var(--attn-text); background: rgba(217,119,87,.09); }
.cn-attn { font-style: normal; font-weight: 800; font-size: 10.5px; color: #fff; background: var(--attn); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 1px; }
.cn-ok { font-style: normal; font-weight: 700; font-size: 10.5px; color: var(--cyan-text); background: rgba(48,120,192,.12); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 1px; }
.pl-yearline { font-size: 11px; font-weight: 700; color: var(--attn-text); background: var(--attn-bg); padding: 5px 14px; border-bottom: 1px solid var(--attn-border); }
.pl-item.pl-hcc-open { box-shadow: inset 3px 0 0 var(--attn); }
.pl-item.pl-hcc-done { box-shadow: inset 3px 0 0 var(--cyan); }
.pl-flag.attn { color: var(--attn-text); }
.pl-flag.done { color: var(--cyan-text); font-size: 10px; font-weight: 700; gap: 3px; }
.pl-capture { font: inherit; font-size: 10px; font-weight: 800; gap: 3px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--attn-border); background: var(--attn-bg); cursor: pointer; }
.pl-capture:hover { background: var(--attn); color: #fff; border-color: var(--attn); }
.pl-sugbox { border-color: var(--attn-border); background: linear-gradient(180deg, rgba(217,119,87,.08), rgba(217,119,87,.03)); }
.pl-sugbox-h { color: var(--attn-text); background: var(--attn-bg); }
.pl-sugbox-n { background: var(--attn); color: #fff; }
.pl-sug2 { border-top-color: rgba(217,119,87,.16); }
.rxp-alg { color: var(--attn-text); background: var(--attn-bg); border: 1px solid var(--attn-border); }
.rxp-ctx-h.attn { color: var(--attn-text); }
.pl-item.pl-hcc-open .pl-t { color: var(--attn-text); font-weight: 700; }
.pl-item.pl-hcc-done .pl-t { color: var(--cyan-text); }
.alg-item .alg-name { color: var(--attn-text); }
.alg-item.sev-severe .alg-name { color: var(--attn-deep); }
.pl-item .pl-t.pl-t-click { color: var(--ink); }
.pl-item.pl-hcc-done .pl-t, .pl-item.pl-hcc-done .pl-t.pl-t-click { color: var(--cyan-text); }
.pl-item.pl-hcc-open .pl-t, .pl-item.pl-hcc-open .pl-t.pl-t-click { color: var(--attn-text); font-weight: 700; }
.card > header .card-add.card-nka { margin-left: auto; color: var(--ok-text); background: var(--ok-bg); }
.card > header .card-add.card-nka:hover { background: rgba(22,163,74,.22); }
.card > header .card-add.card-nka ~ .card-add { margin-left: 0; }
.card > header .card-add[hidden] { display: none !important; }
.emr-toast .emr-toast-act { margin-left: 12px; font: inherit; font-weight: 800; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 3px 12px; cursor: pointer; }
.emr-toast .emr-toast-act:hover { background: rgba(255,255,255,.28); }

/* ---- A&P problem cards: scan-and-click ---- */
.np-prob[tabindex]:focus { outline: none; box-shadow: 0 0 0 2px #cfe0fb, 0 1px 2px rgba(20,30,60,.03); }
.np-prob.dragging { opacity: .45; }
.np-prob.over { box-shadow: 0 -3px 0 0 #2b5fb8 inset, 0 1px 2px rgba(20,30,60,.03); }
.np-prob-primary { border-color: #d5def0; }
.np-drag { cursor: grab; color: #c3c9d6; font-size: 11px; letter-spacing: -2px; user-select: none; padding: 0 2px; }
.np-drag:hover { color: #7684a0; }
.np-prob.dragging .np-drag { cursor: grabbing; }
.np-primary { font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #2b5fb8; background: #eef3fd; border-radius: 6px; padding: 1.5px 6px; }
.np-stat { display: inline-flex; gap: 1px; background: #f1f3f7; border-radius: 8px; padding: 2px; margin-left: 2px; }
.np-st { font-size: 10px; font-weight: 700; color: #6a7686; background: transparent; border: 0; border-radius: 6px; padding: 2px 8px; cursor: pointer; line-height: 1.3; }
.np-st:hover { color: #1d2740; background: #fff; }
.np-st.on { background: #fff; box-shadow: 0 1px 2px rgba(20,30,60,.12); color: #1d2740; }
.np-st.np-st-new.on { color: #2b5fb8; }
.np-st.np-st-improving.on { color: #1d7a3e; }
.np-st.np-st-stable.on { color: #1d2740; }
.np-st.np-st-worsening.on { color: var(--attn-text, #A64B2A); }
.np-stat-ro { font-size: 10px; font-weight: 800; border-radius: 6px; padding: 2px 8px; background: #f1f3f7; color: #3a465f; }
.np-stat-ro.np-st-worsening { background: var(--attn-bg, rgba(217,119,87,.14)); color: var(--attn-text, #A64B2A); }
.np-stat-ro.np-st-improving { background: #e9f7ee; color: #1d7a3e; }
.np-prob-meta { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.np-prob-meta .np-prob-tgl { margin-left: 2px; }
.np-meat.attn .np-meat-seg.on { background: var(--attn, #D97757); }
.np-meat.attn .np-meat-n { color: var(--attn-text, #A64B2A); }
.np-meat-hint { font-size: 9px; font-weight: 700; color: var(--attn-text, #A64B2A); margin-left: 3px; }
.np-meat.attn { cursor: help; }
.np-apc { margin-top: 6px; max-width: 92ch; display: flex; flex-direction: column; gap: 4px; }
.np-apc-line { font-size: 12.5px; line-height: 1.5; color: #2b3550; }
.np-apc-line b { color: #1d2740; }
.np-apc-row { display: flex; gap: 10px; align-items: baseline; padding: 2px 0; }
.np-apc-l { flex: none; width: 34px; font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #98a1b3; padding-top: 3px; }
.np-apc-c { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.6; color: #3a465f; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.np-sep { color: #c3c9d6; }
.np-held { font-style: normal; font-size: 9px; font-weight: 800; color: #8a5b0e; background: #fdf6e3; border-radius: 5px; padding: 0 5px; margin-left: 3px; }
.np-ev { font-size: 10.5px; color: #3a465f; background: #f3f5f9; border: 0; border-radius: 7px; padding: 2px 8px; cursor: pointer; line-height: 1.5; }
.np-ev b { color: #1d2740; font-weight: 800; }
.np-ev i { font-style: normal; color: #98a1b3; font-size: 9.5px; margin-left: 2px; }
.np-ev:hover { background: #e8eef9; color: #1d2740; }
.np-ev.gap { background: var(--attn-bg, rgba(217,119,87,.14)); color: var(--attn-text, #A64B2A); font-weight: 700; }
.np-ev.gap:hover { background: var(--attn, #D97757); color: #fff; }
.np-ev:disabled { opacity: .7; cursor: default; }
.np-linkmed { font-size: 10.5px; font-weight: 700; color: var(--attn-text, #A64B2A); background: transparent; border: 1px dashed var(--attn-border, rgba(217,119,87,.45)); border-radius: 7px; padding: 1px 8px; cursor: pointer; }
.np-linkmed:hover { background: var(--attn-bg, rgba(217,119,87,.14)); }
.np-pc { font-size: 10.5px; font-weight: 700; border-radius: 7px; padding: 2px 9px; border: 0; cursor: pointer; line-height: 1.5; background: #eef3fd; color: #2b4d8f; }
.np-pc:hover { background: #dfe8fb; }
.np-pc.act { background: #e9f7ee; color: #1d7a3e; }
.np-pc.act:hover { background: #d7f0df; }
.np-pc.quiet { background: #f3f5f9; color: #4a5876; cursor: default; }
.np-pc:disabled { opacity: .7; cursor: default; }
.np-apc-tools { display: flex; gap: 6px; margin-top: 2px; }
.np-apc-tool { font-size: 10px; font-weight: 700; color: #7684a0; background: transparent; border: 1px solid #e5e9f1; border-radius: 7px; padding: 2px 8px; cursor: pointer; }
.np-apc-tool:hover { color: #2b5fb8; border-color: #cfe0fb; background: #f6f9ff; }
.np-prob .np-prob-prev { max-width: 92ch; }

.wpc-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.wpc-opt { text-align: left; background: #f6f8fb; border: 1px solid #e5e9f1; border-radius: 10px; padding: 9px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.wpc-opt b { font-size: 13px; color: #1d2740; }
.wpc-opt span { font-size: 11px; color: #6a7686; }
.wpc-opt:hover, .wpc-opt:focus { background: #eef3fd; border-color: #cfe0fb; outline: none; }
button.np-hmchip.due { border: 0; cursor: pointer; }
button.np-hmchip.due:hover { background: var(--attn, #D97757); color: #fff; }
/* narrow note column: status selector takes its own line under the title, meta stays on the first line */
.np-prob { container-type: inline-size; }
@container (max-width: 700px) {
  .np-prob-h .np-prob-meta { order: 4; }
  .np-prob-h .np-stat { order: 6; flex-basis: 100%; margin-left: 22px; align-self: flex-start; width: max-content; }
}

.pa-guide { margin: 4px 0 8px; font-size: 11.5px; color: #4a5876; background: #f7f8fb; border: 1px solid #e5e9f1; border-radius: 8px; padding: 6px 10px; }
.pa-guide summary { cursor: pointer; font-weight: 700; color: #6a7686; font-size: 11px; }
.pa-guide ul { margin: 6px 0 2px 16px; padding: 0; line-height: 1.5; }
.np-pc.chg { background: #fdf6e3; color: #8a5b0e; cursor: default; }

.np-ev.new { box-shadow: inset 2px 0 0 #2b5fb8; padding-left: 9px; }
.np-ev.img, .np-ev.cons { background: #f6f3fb; }
.np-ev.img:hover, .np-ev.cons:hover { background: #ebe4f6; }
.np-iv { font-size: 10.5px; color: #3a465f; background: #fff7ea; border: 0; border-radius: 7px; padding: 2px 8px; cursor: pointer; line-height: 1.5; }
.np-iv i { font-style: normal; color: #98a1b3; font-size: 9.5px; margin-left: 2px; }
.np-iv:hover { background: #fdebc8; color: #1d2740; }
.np-iv-med { background: #fdf6e3; color: #8a5b0e; font-weight: 700; }
.np-iv-hosp { background: var(--attn-bg, rgba(217,119,87,.14)); color: var(--attn-text, #A64B2A); font-weight: 700; }
.np-iv-lab { background: #fbeeee; color: #9c2f2f; }
.np-apc-l { width: 52px; white-space: nowrap; }

.wpc-wide { width: min(520px, calc(100vw - 32px)); }
.wpc-search { width: 100%; box-sizing: border-box; margin-top: 12px; padding: 7px 10px; border: 1px solid #e5e9f1; border-radius: 8px; font-size: 13px; background: #fff; }
.wpc-list { max-height: 46vh; overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.wpc-row { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; color: #1d2740; }
.wpc-row:hover { background: #f1f4fa; }
.wpc-row input { margin: 0; }
.wpc-row-n { flex: 1; min-width: 0; }
.wpc-row-sub { font-style: normal; font-size: 10.5px; color: #98a1b3; }

.nt-ptg-off .nt-ptg-t { color: #7684a0; }
.nt-ptg-hcc.due { background: var(--attn-bg, rgba(217,119,87,.14)); color: var(--attn-text, #A64B2A); }
.nt-ptg-rev { margin-left: auto; font-size: 9.5px; font-weight: 700; color: #98a1b3; background: transparent; border: 1px solid #e5e9f1; border-radius: 6px; padding: 0 6px; cursor: pointer; line-height: 1.6; }
.nt-ptg-rev:hover { color: #1d7a3e; border-color: #cfe9d6; }
.nt-ptg-rev.on { color: #1d7a3e; background: #e9f7ee; border-color: transparent; }

.np-others { margin: 4px 0 6px; padding: 6px 10px; border: 1px dashed #e1e6ef; border-radius: 10px; background: #fafbfd; }
.np-others-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.np-others-tgl { font-size: 11.5px; font-weight: 700; color: #4a5876; background: transparent; border: 0; padding: 0; cursor: pointer; }
.np-others-tgl:hover { color: #2b5fb8; }
.np-others-n { font-size: 10.5px; font-weight: 700; color: #1d7a3e; }
.np-others-hint { font-size: 10.5px; color: #98a1b3; }
.np-others.open .np-others-hint { flex-basis: 100%; }
.np-others-list { margin-top: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2px 14px; }
.np-other { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #3a465f; padding: 2px 0; min-width: 0; }
.np-other.rev .np-other-t { color: #1d7a3e; }
.np-other-code { font-size: 10px; font-weight: 700; color: #6a7686; flex: none; }
.np-other-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-other-b { font-size: 9.5px; font-weight: 700; color: #6a7686; background: transparent; border: 1px solid #e5e9f1; border-radius: 6px; padding: 0 6px; cursor: pointer; line-height: 1.7; flex: none; }
.np-other-b:hover { color: #2b5fb8; border-color: #cfe0fb; }
.np-other-b.on { color: #1d7a3e; background: #e9f7ee; border-color: transparent; }
.np-others-all { grid-column: 1 / -1; margin-top: 4px; }

.vx-ws.dragging { user-select: none; opacity: .96; }
.vx-tab-others { align-self: center; font-size: 11px; font-weight: 600; color: #98a1b3; padding: 0 8px; white-space: nowrap; }
.vx-ws-h { cursor: grab; }

.np-mednote { font-size: 11.5px; color: #3a465f; font-style: italic; }

.rec .rt { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.rec-kl { font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #7684a0; margin-right: 6px; vertical-align: 1px; }
.rec .rsub { font-size: 11px; color: #6a7686; margin: 1px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Work › step rail (Referrals / Imaging / Labs): one loud number, the whole pipeline in order ---- */
.sp-steps.sp2 { border: 0; border-radius: 18px; box-shadow: 0 1px 0 rgba(20,30,60,.05), 0 8px 24px -16px rgba(20,30,60,.18); background: #fff; }
.sp2-head { padding: 22px 22px 14px; }
.sp2-eyebrow { font-size: 12px; font-weight: 600; color: #8a92a6; letter-spacing: .02em; }
.sp2-big { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.sp2-n { font-size: 42px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: #1c2333; }
.sp2-w { font-size: 16px; font-weight: 600; color: #1c2333; }
.sp2-quiet { font-size: 13px; color: #8a92a6; margin-top: 8px; }
.sp2-seg { display: flex; gap: 4px; align-items: center; padding: 0 22px 6px; flex-wrap: wrap; }
.sp2-chip { font: inherit; font-size: 12.5px; font-weight: 600; color: #5b6478; padding: 6px 12px; border-radius: 999px; background: #f1f3f6; border: 0; cursor: pointer; }
.sp2-chip.on { background: #1c2333; color: #fff; }
.sp2-chip.warn { color: var(--attn-text, #b3541e); } .sp2-chip.warn.on { background: var(--attn-text, #b3541e); color: #fff; }
.sp2-leg { margin-left: auto; font-size: 11.5px; color: #8a92a6; white-space: nowrap; }
.sp2-leg i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1c2333; margin: 0 4px 0 8px; vertical-align: 0; }
.sp2-leg i.g { background: #8fc8a5; }
.sp2 .sp-search { padding: 4px 22px 10px; }
.sp2-steps { padding: 0 22px 18px; }
.sp2-step { display: grid; grid-template-columns: 22px 1fr auto; column-gap: 14px; align-items: center; min-height: 50px; width: 100%; text-align: left; border: 0; background: transparent; font: inherit; cursor: pointer; position: relative; padding: 0; border-radius: 10px; }
.sp2-step::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: #eceff3; }
.sp2-step:first-child::before { top: 50%; } .sp2-step:last-child::before { bottom: 50%; }
.sp2-step:hover .sp2-name { color: #2b5fb8; }
.sp2-step.on .sp2-name { color: #1B2B5B; }
.sp2-step.on::after { content: ''; position: absolute; left: 30px; right: -6px; top: 4px; bottom: 4px; background: rgba(24,36,96,.05); border-radius: 10px; z-index: 0; }
.sp2-step > * { position: relative; z-index: 1; }
.sp2-dot { width: 10px; height: 10px; border-radius: 50%; background: #1c2333; justify-self: center; }
.sp2-dot.auto { background: #8fc8a5; }
.sp2-dot.z { width: 8px; height: 8px; background: #fff; border: 2px solid #dfe3ea; }
.sp2-t { padding: 8px 0; min-width: 0; }
.sp2-name { display: block; font-size: 15px; font-weight: 600; color: #1c2333; }
.sp2-sub { display: block; font-size: 12px; color: #8a92a6; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp2-sub em { font-style: normal; } .sp2-sub em.w { color: var(--attn-text, #b3541e); font-weight: 600; }
.sp2-step.z .sp2-name { color: #b6bcc9; font-weight: 500; }
.sp2-r { display: flex; align-items: center; gap: 10px; padding-right: 8px; }
.sp2-cnt { font-size: 21px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; color: #1c2333; }
.sp2-cnt.w { color: var(--attn-text, #b3541e); } .sp2-cnt.g { color: #6a7686; font-weight: 600; }
.sp2-step.z .sp2-cnt { color: #d3d7e0; font-weight: 500; font-size: 17px; }
.sp2-go { font-size: 13px; font-weight: 600; color: #1c2333; background: #f1f3f6; border-radius: 10px; padding: 6px 11px; white-space: nowrap; }
.sp2-go.p { background: #1c2333; color: #fff; }

/* patient rows on the step page: name, the thing, a quiet warning chip, buttons right; the timeline evenly spaced */
.sp-pt { border: 0; border-radius: 14px; box-shadow: 0 1px 0 rgba(20,30,60,.05), 0 6px 18px -14px rgba(20,30,60,.18); padding: 14px 18px; }
.sp-h { gap: 8px 12px; }
.sp-h .sp-name { font-size: 15.5px; font-weight: 700; color: #1c2333; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.sp-h .sp-name:hover { color: #2b5fb8; }
.sp-h .sp-why { font-size: 14px; color: #3a4256; font-weight: 500; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.sp-h .aw-bad { font-size: 11px; font-weight: 700; color: var(--attn-text, #A64B2A); background: var(--attn-bg, rgba(217,119,87,.14)); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.sp-h .cal-btn { font-size: 13px; }
.sp-rail { margin-top: 12px; gap: 0; }
.sp-l { max-width: none; margin-bottom: 15px; }
.sp-s span { font-size: 11px; letter-spacing: .01em; }
.sp-s.now i { border-color: var(--attn, #D97757); background: #fff; box-shadow: 0 0 0 3px rgba(217,119,87,.16); }
.sp-s.now span { color: #1c2333; font-weight: 700; }

/* Work › step pages: full-height two-column grid, each column scrolls on its own, divider drags (wpSplit) */
#genericBody .sp { height: calc(100vh - 58px - 22px); min-height: 0; max-width: none; align-items: stretch; }
#genericBody .sp > .sp-left, #genericBody .sp > .sp-main { min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; padding-bottom: 28px; }
#genericBody .sp > .sp-left { padding-right: 10px; }
#genericBody .sp > .sp-main { padding-left: 14px; }
#genericBody .sp > .wp-vsplit:hover::after { background: #2b5fb8; }

/* ---- Work board: one loud number, soft cards, sentence rows, EMR palette ---- */
.aw-eyebrow { font-size: 12px; font-weight: 600; color: #8a92a6; letter-spacing: .02em; margin-top: 4px; }
.aw-big { display: flex; align-items: baseline; gap: 12px; margin-top: 2px; }
.aw-bign { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--navy, #1B2B5B); }
.aw-bigw { font-size: 17px; font-weight: 600; color: #1c2333; }
.aw-hero p.aw-quietline { font-size: 14px; color: #8a92a6; margin: 8px 0 0; }
.aw-hero p.aw-quietline b { color: #1c2333; font-weight: 600; }
.aw-hero-a { flex-direction: column; align-items: flex-end; gap: 10px; }
.aw .aw-next { display: flex; align-items: center; gap: 16px; background: #fff; color: #1c2333; border-radius: 14px; padding: 10px 12px 10px 16px; box-shadow: 0 1px 0 rgba(20,30,60,.05), 0 8px 24px -16px rgba(20,30,60,.18); margin: 0; }
.aw .aw-next b { font-size: 15px; font-weight: 700; display: block; }
.aw .aw-next-l { font-size: 12px; color: #8a92a6; font-weight: 600; display: block; }
.aw-cols { gap: 18px; }
.aw .aw-col.card { border: 0; border-radius: 18px; box-shadow: 0 1px 0 rgba(20,30,60,.05), 0 8px 24px -16px rgba(20,30,60,.18); }
.aw .aw-col h3 { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 22px 8px; font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: none; color: #1c2333; border: 0; }
.aw .aw-col h3 .aw-cc { font-size: 13px; color: #8a92a6; font-weight: 500; background: none; padding: 0; }
.aw .aw-col h3 .aw-cc b { color: var(--attn-text, #A64B2A); font-weight: 700; background: none; padding: 0; font-size: 13px; }
.aw .aw-k { grid-template-columns: 1fr auto auto; column-gap: 16px; padding: 14px 22px; border-top: 1px solid #f1f3f6; border-bottom: 0; }
.aw .aw-k .aw-m b { font-size: 16px; font-weight: 600; color: #1c2333; }
.aw .aw-k .aw-s { font-size: 13px; color: #8a92a6; margin-top: 2px; }
.aw .aw-k .aw-s .aw-late { font-style: normal; color: var(--attn-text, #A64B2A); font-weight: 600; }
.aw .aw-k .aw-n { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-align: right; min-width: 40px; color: #1c2333; line-height: 1; }
.aw .aw-k .aw-n.w { color: var(--attn-text, #A64B2A); } .aw .aw-k .aw-n.q { color: #8a92a6; font-weight: 600; font-size: 22px; }
.aw-go { font: inherit; font-size: 13.5px; font-weight: 700; color: #2b5fb8; background: #eef3fd; border: 0; border-radius: 10px; padding: 8px 13px; white-space: nowrap; min-width: 82px; text-align: center; cursor: pointer; }
.aw-go:hover { background: #dfe8fb; }
.aw-go.p { background: var(--navy, #1B2B5B); color: #fff; } .aw-go.p:hover { background: #2a3d7a; }
.aw-go.w { background: var(--attn, #D97757); color: #fff; }
.aw-go.q { background: transparent; color: #98a1b3; font-weight: 600; cursor: default; }
.aw .aw-k .aw-bar { grid-column: 1 / -1; height: 3px; margin-top: 10px; max-width: none; background: #eef0f4; }
.aw .aw-k .aw-bar i { background: #a9d8b8; } .aw .aw-k .aw-bar i.you { background: var(--navy, #1B2B5B); }
.aw .aw-quiet { display: block; padding: 12px 22px 16px; font-size: 12.5px; color: #8a92a6; border-top: 1px solid #f1f3f6; }
.aw .aw-quiet b { color: #5b6478; font-weight: 600; background: none; padding: 0; border-radius: 0; }


/* ── Home: quick actions as one pill group with shortcut letters ── */
.qa-group { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 5px; box-shadow: 0 1px 0 rgba(20,30,60,.04), 0 8px 24px -18px rgba(20,30,60,.2); }
.qa-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); padding: 8px 13px; border-radius: 10px; cursor: pointer; transition: background .12s; }
.qa-btn:hover { background: var(--hov, #f1f3f6); }
.qa-btn.p { background: var(--navy); color: #fff; }
.qa-btn.p:hover { background: #172448; }
.qa-btn kbd { font: inherit; font-size: 10px; font-weight: 700; color: #98a1b3; }
.qa-btn.p kbd { color: rgba(255,255,255,.6); }
.qa-btn .qb { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; }
.home-head .sub { font-size: 13px; color: #8a92a6; }
/* For-you rail: zero rows stay quiet, the open row is a dark pill */
.q-cat.dim { opacity: 1; }
.q-cat.dim .q-cat-l { color: #98a1b3; font-weight: 500; font-size: 12.5px; }
.q-cat.dim .q-cat-n { background: transparent; color: #c3c9d6; }
.q-cat.active { background: var(--navy); box-shadow: none; }

/* ── Orders to sign: one loud number, kind chips, group Sign all, age, sticky bar ── */
.osq-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px 8px; flex-wrap: wrap; }
.osq-big { font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); white-space: nowrap; }
.osq-big b { color: #A64B2A; }
.osq-seg { display: flex; gap: 4px; margin-left: 6px; }
.osq-seg button { border: 0; background: #f1f3f6; font: inherit; font-size: 12.5px; font-weight: 600; color: #5b6478; border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.osq-seg button.on { background: var(--ink); color: #fff; }
.osq-keys { margin-left: auto; font-size: 11.5px; color: #98a1b3; white-space: nowrap; }
.os-grp-h .osq-all { color: #2b5fb8; background: #eef3fd; border-color: transparent; font-weight: 700; text-transform: none; letter-spacing: 0; }
.os-row { grid-template-columns: 18px 1fr auto auto; }
.os-row.cur { box-shadow: inset 3px 0 0 var(--navy); background: rgba(30,46,96,.04); }
.os-age { font-size: 12px; color: #8a92a6; white-space: nowrap; font-variant-numeric: tabular-nums; }
.os-age.w { color: #A64B2A; font-weight: 600; }
.osq-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 10px 18px; margin: 8px 16px 0; border: 1px solid var(--line); background: #fafbfc; border-radius: 12px; font-size: 13px; color: #5b6478; box-shadow: 0 -6px 18px -12px rgba(20,30,60,.25); }
.osq-bar [data-ossel] { margin-left: auto; }

/* ── Calendar: office hours, month strip, month view, provider columns, type colours, status chips ── */
.cal-title small { display: block; font-size: 12px; font-weight: 500; color: #8a92a6; letter-spacing: 0; margin-top: 1px; }
.cal-expanded .cal-title { font-size: 18px; }
.cal-quick { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: #f7f8fb; border: 1px solid transparent; border-radius: 12px; padding: 0 12px; min-width: 220px; }
.cal-quick svg { width: 14px; height: 14px; color: var(--navy); flex-shrink: 0; }
.cal-quick-in { flex: 1; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink); padding: 9px 0; outline: none; min-width: 0; }
.cal-quick:focus-within { background: #fff; border-color: var(--line); }
.cal-months { display: flex; align-items: center; gap: 2px; padding: 8px 14px; border-bottom: 1px solid var(--line-2); }
.cal-mo { border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: #5b6478; padding: 6px 11px; border-radius: 999px; cursor: pointer; }
.cal-mo:hover { background: #f1f3f6; color: var(--navy); }
.cal-mo.now { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #A64B2A; }
.cal-mo.on { background: var(--navy); color: #fff; text-decoration: none; }
.cal-year { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--navy); }
.cal-stats { display: flex; gap: 18px; padding: 8px 18px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; color: #5b6478; }
.cal-stats b { color: var(--ink); }
.cal-stats-r { margin-left: auto; color: #8a92a6; }
.cal-legend { display: flex; gap: 16px; padding: 9px 18px; font-size: 11.5px; color: #8a92a6; border-top: 1px solid var(--line-2); }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border-left: 3px solid; }
.cal-legend-r { margin-left: auto; }
.ty-fu { background: #eef3fd; border-color: #2b5fb8 !important; }
.ty-awv { background: #e9f7ee; border-color: #1d7a3e !important; }
.ty-new { background: #fdf6e3; border-color: #c98a1b !important; }
.ty-res { background: rgba(217,119,87,.14); border-color: #D97757 !important; }
.ty-other { background: rgba(24,36,96,.07); border-color: var(--navy) !important; }
.cal-lunch { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(20,30,60,.035) 0 6px, transparent 6px 12px); pointer-events: none; z-index: 1; }
.cal-appt { padding: 4px 9px; line-height: 1.3; }
/* type and cancelled styling both come from --c now; nothing to override here */
.ca-st { display: inline-block; font-size: 9.5px; font-weight: 700; border-radius: 5px; padding: 1px 6px; background: #fff; color: #1d7a3e; white-space: nowrap; }
.ca-st.room { color: #2b5fb8; } .ca-st.done { color: #8a92a6; } .ca-st.bad { color: #A64B2A; }
.cal-colhead.prov { flex-direction: column; gap: 0; align-items: flex-start; padding: 0 14px; height: 44px; justify-content: center; text-transform: none; letter-spacing: 0; border-left: 1px solid var(--line-2); }
.cal-colhead.prov b { font-size: 13px; color: var(--navy); }
.cal-colhead.prov small { font-size: 11.5px; font-weight: 500; color: #98a1b3; }
.cal-colhead small { font-size: 10px; font-weight: 700; color: var(--navy); background: rgba(48,120,192,.14); border-radius: 999px; padding: 0 6px; }
.cal-colhead[data-wday] { cursor: pointer; } .cal-colhead[data-wday]:hover { background: rgba(48,120,192,.06); }
.cal-grid.is-provs .cal-gutter { padding-top: 44px; }
.cal-grid.is-provs .cal-cols .cal-col { flex: 1; border-left: 1px solid var(--line-2); }
/* empty day + next-day agenda */
.cal-grid.is-empty { display: block; }
.cal-empty { margin: 14px 18px 8px; padding: 14px 16px; border-radius: 12px; background: #f7f8fb; font-size: 13.5px; color: #5b6478; }
.cal-empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.cal-agenda { padding: 0 18px 8px; }
.cal-ag-h { display: flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 700; color: #8a92a6; letter-spacing: .03em; margin: 12px 0 4px; }
.cal-ag-open { margin-left: auto; border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 700; color: #2b5fb8; cursor: pointer; letter-spacing: 0; }
.cal-ag { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-2); }
.cal-ag-t { font-size: 13px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.cal-ag-m { min-width: 0; } .cal-ag-m b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); } .cal-ag-m span { font-size: 12px; color: #8a92a6; }
.cal-ag-go { border: 0; background: #eef3fd; color: #2b5fb8; font: inherit; font-size: 12px; font-weight: 700; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.cal-ag-go:hover { background: #dfe8fb; }
.cal-ag.more { display: block; font-size: 12px; color: #8a92a6; cursor: pointer; } .cal-ag.more:hover { color: var(--navy); }
.cal-empty-a { padding: 6px 18px 16px; }
/* month view: a strip of weeks */
.cal-grid.is-month { display: block; }
.cal-mhead { display: grid; grid-template-columns: 44px repeat(7, 1fr); border-bottom: 1px solid var(--line-2); }
.cal-mhead span { padding: 8px 10px; font-size: 11px; font-weight: 700; color: #5b6478; text-transform: uppercase; letter-spacing: .04em; }
.cal-week { display: grid; grid-template-columns: 44px repeat(7, 1fr); border-bottom: 1px solid var(--line-2); min-height: 108px; }
.cal-week:last-child { border-bottom: 0; }
.cal-wk { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #c3c9d6; background: #fafbfc; border-right: 1px solid var(--line-2); }
.cal-wk small { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #c3c9d6; }
.cal-mday { padding: 6px 8px; border-left: 1px solid var(--line-2); cursor: pointer; min-width: 0; transition: background .12s; }
.cal-mday:hover { background: rgba(48,120,192,.05); }
.cal-mday.out { background: #fafbfc; } .cal-mday.out .cal-mday-h b { color: #c3c9d6; }
.cal-mday.wkend:not(.out) { background: rgba(20,30,60,.015); }
.cal-mday-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cal-mday-h b { font-size: 13px; font-weight: 700; color: var(--ink); width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-mday.is-today .cal-mday-h b { background: var(--navy); color: #fff; }
.cal-mday-h span { font-size: 10.5px; font-weight: 700; color: var(--navy); background: rgba(48,120,192,.14); border-radius: 999px; padding: 0 7px; }
.cal-mev { display: flex; gap: 5px; align-items: baseline; font-size: 11px; font-weight: 600; color: var(--ink); border-left: 3px solid; border-radius: 5px; padding: 2px 6px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-mev i { font-style: normal; font-weight: 500; color: #5b6478; font-variant-numeric: tabular-nums; }
.cal-mmore { font-size: 11px; color: #8a92a6; padding-left: 6px; }

/* ── Who · where picker: physician + office, then the calendar jumps to their next day there ── */
.cal-who { display: inline-flex; align-items: center; gap: 3px; background: #f1f3f6; border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.cal-who button { border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: #5b6478; padding: 6px 11px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.cal-who button:hover { color: var(--navy); }
.cal-who button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(20,30,60,.12); }
.cal-who button.loc.on { background: var(--navy); color: #fff; }
.cal-who-sep { width: 1px; height: 18px; background: #d6dae3; margin: 0 4px; }
.cal-who-edit { font-size: 11.5px !important; color: #98a1b3 !important; font-weight: 500 !important; }
.cal-avail { padding: 10px 18px 12px; border-bottom: 1px solid var(--line-2); background: #fafbfc; }
.cal-avail-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cal-avail-h b { font-size: 14px; color: var(--navy); }
.cal-avail-h span { font-size: 12.5px; color: #5b6478; }
.cal-avail-l { font-size: 13px; color: var(--ink); margin-top: 3px; }
.cal-avail-s { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: #8a92a6; }
.cal-avail-s > span:first-child { font-weight: 700; letter-spacing: .02em; text-transform: uppercase; font-size: 11px; }
.cal-open-day { display: inline-flex; align-items: center; gap: 4px; }
.cal-open-day i { font-style: normal; font-weight: 600; color: #5b6478; margin-right: 2px; }
.cal-open-day button { border: 0; background: #eef3fd; color: #2b5fb8; font: inherit; font-size: 12px; font-weight: 700; border-radius: 7px; padding: 4px 8px; cursor: pointer; font-variant-numeric: tabular-nums; }
.cal-open-day button:hover { background: var(--navy); color: #fff; }
.cal-away { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(20,30,60,.05) 0 6px, rgba(20,30,60,.02) 6px 12px); z-index: 2; pointer-events: none; display: flex; align-items: flex-start; justify-content: center; }
.cal-away span { margin-top: 6px; font-size: 11px; font-weight: 600; color: #8a92a6; background: rgba(255,255,255,.85); border-radius: 999px; padding: 2px 9px; }
/* schedule editor */
.sch-hint { font-size: 13px; color: #5b6478; margin: 0 0 12px; }
.sch-prov { margin-bottom: 14px; } .sch-prov h3 { font-size: 14px; color: var(--navy); margin: 0 0 6px; }
.sch-row { display: grid; grid-template-columns: 92px repeat(5, 1fr); gap: 6px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line-2); }
.sch-row b { font-size: 13px; }
.sch-day { display: flex; flex-direction: column; gap: 3px; align-items: stretch; padding: 5px 7px; border: 1px solid var(--line-2); border-radius: 9px; font-size: 12px; color: #8a92a6; }
.sch-day.on { border-color: var(--navy); color: var(--ink); background: #eef3fd; }
.sch-day input { display: none; } .sch-day span { font-weight: 700; cursor: pointer; }
.sch-day select { font: inherit; font-size: 11.5px; border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 4px; background: #fff; }
.sch-day select:disabled { opacity: .5; }

/* ── Home: three columns, each scrolls on its own, dividers drag (wpSplit) ── */
#view-home .home { display: flex; flex-direction: column; height: calc(100vh - 58px); box-sizing: border-box; }
#view-home .ph-grid { flex: 1; min-height: 0; align-items: stretch; }
#view-home .queue { min-height: 0; height: 100%; align-items: stretch; }
#view-home #calHost, #view-home .q-rail, #view-home .q-detail { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#view-home #calHost .cal-card:not(.cal-expanded) { display: flex; flex-direction: column; height: 100%; }
#view-home #calHost .cal-card:not(.cal-expanded) .cal-scroll { flex: 1; max-height: none; min-height: 0; }
#view-home .wp-vsplit { align-self: stretch; }
@media (max-width: 1180px) { #view-home .home { height: auto; } #view-home #calHost, #view-home .q-rail, #view-home .q-detail { overflow: visible; } }

.cal-jumps { display: inline-flex; align-items: center; gap: 2px; margin-left: 14px; padding-left: 12px; border-left: 1px solid var(--line-2); }
.cal-jumps small { font-size: 10.5px; color: #98a1b3; margin-right: 4px; white-space: nowrap; }
.cal-jumps button { border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 700; color: #2b5fb8; padding: 5px 8px; border-radius: 999px; cursor: pointer; font-variant-numeric: tabular-nums; }
.cal-jumps button:hover { background: #eef3fd; }

/* expanded calendar: the grid is the one thing that scrolls */
.cal-card.cal-expanded { display: flex; flex-direction: column; }
.cal-expanded .cal-scroll { flex: 1; min-height: 0; max-height: none; }
/* compact toolbar on Home: two tight rows, no wasted height */
.cal-card:not(.cal-expanded) .cal-toolbar { padding: 9px 12px; gap: 8px; row-gap: 6px; }
.cal-card:not(.cal-expanded) .cal-title { min-width: 0; font-size: 14px; flex: 1; }
.cal-card:not(.cal-expanded) .cal-tools { margin-left: 0; }
.cal-card:not(.cal-expanded) .cal-tools .cal-btn { padding: 6px 8px; }
.cal-card:not(.cal-expanded) .cal-seg button { padding: 4px 10px; font-size: 12px; }
.cal-card:not(.cal-expanded) .cal-who { flex-wrap: nowrap; padding: 2px; gap: 1px; }
.cal-card:not(.cal-expanded) .cal-who button { padding: 4px 8px; font-size: 11.5px; }
.cal-card:not(.cal-expanded) .cal-who-sep { margin: 0 2px; height: 14px; }
.cal-card:not(.cal-expanded) .cal-nav .datenav, .cal-card:not(.cal-expanded) .cal-nav .today-btn { padding: 5px 9px; }
/* month cells the physician is elsewhere: grey, labelled, not bookable */
.cal-mday.off { background: repeating-linear-gradient(135deg, rgba(20,30,60,.05) 0 6px, rgba(20,30,60,.02) 6px 12px); cursor: default; }
.cal-mday.off:hover { background: repeating-linear-gradient(135deg, rgba(20,30,60,.05) 0 6px, rgba(20,30,60,.02) 6px 12px); }
.cal-mday.off .cal-mday-h b { color: #98a1b3; }
.cal-mday-h em { font-style: normal; font-size: 10px; font-weight: 600; color: #8a92a6; margin-right: auto; margin-left: 6px; }

/* compact card = two rows: nav · date · tools, then who · where (Day/Week/Month live in the full view) */
.cal-card:not(.cal-expanded) .cal-seg { display: none; }
.cal-card:not(.cal-expanded) .cal-tools { order: 1; }
.cal-card:not(.cal-expanded) .cal-who { order: 2; flex: 1; justify-content: flex-start; }
.cal-card:not(.cal-expanded) .cal-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.slot-office { width: 100%; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5b6478; margin: 6px 0 2px; }
.slot-next { border: 0; background: #eef3fd; color: #2b5fb8; font: inherit; font-size: 12.5px; font-weight: 700; border-radius: 8px; padding: 4px 10px; cursor: pointer; margin-left: 4px; }

/* visit cards: colour from the type or the visit itself; short visits on one line; hover shows the whole card */
.cal-appt.one { display: flex; align-items: center; padding-top: 0; padding-bottom: 0; }
.cal-appt.one .ca-row { width: 100%; min-width: 0; }
.cal-appt.one .ca-sub { flex: 1; min-width: 0; margin-left: 6px; }
.cal-appt .ca-name { font-size: 12.5px; }
.cal-appt .ca-sub { font-size: 11px; }
/* no height change on hover — growing the card under the pointer was the other half of the
   flicker; the full detail is in the tooltip and one click away */
/* a ten-minute visit stays one line on hover — re-flowing to a column moved the card out from
   under the pointer and started the flicker */
/* colour editor and per-visit colour pick */
.clr-row { display: grid; grid-template-columns: 170px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.clr-chip { display: inline-block; font-size: 12.5px; font-weight: 600; border-left: 3px solid; border-radius: 8px; padding: 6px 10px; color: var(--ink); }
.clr-sw, .clr-pick { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.sw { width: 20px; height: 20px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.sw.on { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }
.sw.type { width: auto; height: auto; padding: 2px 8px; font: inherit; font-size: 11px; font-weight: 700; background: #f1f3f6; color: #5b6478; border-radius: 999px; }
.sw.type.on { background: var(--navy); color: #fff; border-color: transparent; }
.clr-row input[type=color], .clr-pick input[type=color] { width: 34px; height: 26px; border: 1px solid var(--line); border-radius: 7px; padding: 1px; background: #fff; cursor: pointer; }

/* six 10-minute rows per hour: faint 10-min lines, a firmer half-hour line */
.cal-hour { background-image:
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(24,36,96,.11) 50%, transparent calc(50% + 0.5px)),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(100% / 6 - 1px), rgba(24,36,96,.045) calc(100% / 6 - 1px), rgba(24,36,96,.045) calc(100% / 6)); }
.cal-appt.one { min-height: 20px; }
.cal-appt.one .ca-name, .cal-appt.one .ca-sub { font-size: 11.5px; line-height: 1.2; }

/* ── the visit window: chips in the EMR palette instead of native dropdowns ── */
.mv-sum { font-size: 12.5px; color: #8a92a6; margin-top: 2px; }
.modal-body.mv .fld > span:first-child { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #5b6478; }
.mv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mv-chips button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: all .12s; }
.mv-chips button:hover { border-color: #b9c3d9; background: #f7f8fb; }
.mv-chips button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.mv-chips button small { font-size: 10.5px; font-weight: 600; color: #8a92a6; }
.mv-chips button.on small { color: rgba(255,255,255,.7); }
.mv-chips .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.mv-chips button.on .dot { box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.mv-chips.seg { display: inline-flex; gap: 2px; background: #f1f3f6; border-radius: 10px; padding: 3px; }
.mv-chips.seg button { border: 0; background: transparent; border-radius: 8px; color: #5b6478; padding: 6px 12px; }
.mv-chips.seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(20,30,60,.12); }
.mv-when { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.mv-when input[type=date] { width: 160px; } .mv-when input[type=time] { width: 120px; }
.mv-when .jump-chips { margin-left: 4px; }
.mv-row { gap: 22px; flex-wrap: wrap; } .mv-row .fld { flex: 0 0 auto; }
.mv-other { margin-top: 6px; max-width: 220px; }
.mv-durrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mv-durx { border: 1px dashed var(--line); background: transparent; font: inherit; font-size: 12px; font-weight: 600; color: #5b6478; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.mv-durx:hover { border-color: #b9c3d9; color: var(--ink); }
.mv-durrow .mv-other { margin-top: 0; width: 96px; }
.modal-body.mv .slot-head { margin-top: 2px; }
.modal-body.mv .slot-grid { max-height: 150px; }
.modal-body.mv .slot.sel { background: var(--navy); color: #fff; border-color: var(--navy); }

/* visit card: white with the colour as a 4-px bar and a soft tint, time on the right, up to three lines */
.cal-appt { border-left-width: 4px; border-radius: 10px; padding: 5px 10px 5px 9px; box-shadow: 0 1px 2px rgba(20,30,60,.08), inset 0 0 0 1px rgba(255,255,255,.7); line-height: 1.25; }

.cal-appt .ca-row { display: flex; align-items: center; gap: 6px; }
.cal-appt .ca-name { font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.cal-appt .ca-t { margin-left: auto; font-size: 11px; font-weight: 600; color: #5b6478; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-appt .ca-sub { font-size: 11.5px; color: #3d4659; display: flex; align-items: center; gap: 5px; margin-top: 1px; }
.cal-appt .ca-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cal-appt .ca-meta { font-size: 11px; color: #8a92a6; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-appt .ca-badges { gap: 4px; }
.cal-appt.one .ca-row { gap: 8px; } .cal-appt.one .ca-sub { margin-top: 0; }
.cal-appt.one .ca-t { font-size: 10.5px; }


/* ── Patients: one clean list — avatar, name + age, DOB · phone · plan, physician, last visit, next visit, care needs ── */
.pt-page { max-width: 1240px; }
.pt-page .wk-sub b { color: var(--navy); }
.pt-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.pt-search { flex: 1 1 280px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; min-width: 240px; }
.pt-search svg { width: 15px; height: 15px; color: var(--navy); flex-shrink: 0; }
.pt-search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 14px; padding: 10px 0; outline: none; color: var(--ink); }
.pt-search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(27,43,91,.08); }
.pt-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.pt-chips button { border: 0; background: #f1f3f6; font: inherit; font-size: 12.5px; font-weight: 600; color: #5b6478; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.pt-chips button:hover { color: var(--navy); }
.pt-chips button.on { background: var(--ink); color: #fff; }
.pt-sort { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #8a92a6; }
.pt-sort select { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--navy); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: #fff; }
.pt-list { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 0 rgba(20,30,60,.04), 0 8px 24px -18px rgba(20,30,60,.2); }
.pt-letter { position: sticky; top: 0; z-index: 2; padding: 6px 18px; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #8a92a6; background: #fafbfc; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.pt-row { display: grid; grid-template-columns: 38px minmax(220px, 1.6fr) 110px 96px 150px 130px auto; gap: 14px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line-2); cursor: pointer; transition: background .12s; }
.pt-row:first-child { border-top: 0; }
.pt-row:hover, .pt-row:focus-visible { background: #f7f8fb; outline: none; }
.pt-av { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; color: hsl(var(--h) 45% 32%); background: hsl(var(--h) 55% 92%); letter-spacing: .02em; }
.pt-m { min-width: 0; }
.pt-n { display: flex; align-items: baseline; gap: 8px; } .pt-n b { font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pt-n span { font-size: 12px; font-weight: 600; color: #8a92a6; }
.pt-s { font-size: 12.5px; color: #8a92a6; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-c { font-size: 12.5px; color: #3d4659; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pt-pcp { font-weight: 600; color: var(--navy); }
.pt-last i { font-style: normal; color: #b6bcc9; }
.pt-next { color: #1d7a3e; font-weight: 600; }
.pt-needs em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #A64B2A; background: rgba(217,119,87,.14); border-radius: 999px; padding: 2px 9px; }
.pt-a { display: flex; align-items: center; gap: 4px; justify-self: end; }
.pt-a .cal-btn { opacity: 0; transition: opacity .12s; } .pt-row:hover .pt-a .cal-btn, .pt-row:focus-within .pt-a .cal-btn { opacity: 1; }
@media (max-width: 1100px) { .pt-row { grid-template-columns: 38px 1fr 100px auto; } .pt-last, .pt-next, .pt-needs { display: none; } }

.sp-fix { font-size: 11.5px; color: #5b6478; margin: 4px 0 6px; line-height: 1.5; } .sp-fix s { color: #A64B2A; text-decoration-color: rgba(166,75,42,.6); margin-right: 2px; }

.cd-tabs { flex-wrap: wrap; }
.cd-consults { display: flex; flex-direction: column; }
.cd-crow { display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: center; padding: 9px 6px; border-top: 1px solid var(--line-2); cursor: pointer; }
.cd-crow:first-child { border-top: 0; } .cd-crow:hover { background: #f7f8fb; }
.cd-cd { font-size: 11.5px; color: #8a92a6; font-variant-numeric: tabular-nums; }
.cd-cm { min-width: 0; } .cd-cm b { display: block; font-size: 13px; color: var(--ink); } .cd-cm span { display: block; font-size: 12px; color: #5b6478; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* billing window: payer row, NPIs, ordering provider on lines, payer add-ons */
.nb-payer { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 10px; border-radius: 10px; background: #eef3fd; font-size: 12.5px; }
.nb-payer.warn { background: rgba(217,119,87,.10); }
.nb-payer-k { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5b6478; }
.nb-payer b { font-size: 13.5px; color: var(--navy); }
.nb-payer-p { color: #3d4659; } .nb-payer-f { font-size: 11px; font-weight: 700; color: #2b5fb8; background: #fff; border-radius: 999px; padding: 1px 8px; }
.nb-payer-src { font-size: 10.5px; color: #8a92a6; border: 1px dashed #c3c9d6; border-radius: 999px; padding: 0 7px; }
.nb-payer-why { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.nb-payer-why i { font-style: normal; font-size: 11.5px; color: #3d4659; background: rgba(255,255,255,.8); border-radius: 6px; padding: 2px 8px; }
.nb-payer-warn { flex-basis: 100%; font-size: 12px; font-weight: 600; color: #A64B2A; }
.nb-npis { flex-basis: 100%; font-size: 11.5px; color: #8a92a6; } .nb-npis b { color: #3d4659; font-weight: 600; }
.nb-ord { font-size: 11px; color: #5b6478; margin-left: 8px; } .nb-ord b { color: var(--navy); font-weight: 600; }
.nb-addon { font-size: 10.5px; font-weight: 700; color: #1d7a3e; background: #e9f7ee; border-radius: 999px; padding: 1px 8px; margin-left: 8px; }

/* ── claim header: one tidy card, three columns, NPIs as a footer line ── */
.nb-claim { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; align-items: end; padding: 12px 14px; margin: 0 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.nb-claim label { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #8b94a8; }
.nb-claim input, .nb-claim select { font-size: 12.5px; padding: 7px 9px; min-width: 0; }
.nb-claim .nb-npis { grid-column: 1 / -1; font-size: 11.5px; color: #8a92a6; white-space: normal; padding-top: 4px; border-top: 1px solid var(--line-2); }
.nb-claim .nb-time { grid-column: 1 / -1; justify-self: end; font-size: 11.5px; color: #1d7a3e; font-weight: 600; }
/* ── claim lines: code with its plain name, modifiers, quantity ── */
.nb-item { border-radius: 12px; border-color: var(--line); border-left-width: 4px; }
.nb-ihead { padding: 8px 10px; gap: 8px; }
.nb-code { display: inline-flex; flex-direction: column; gap: 1px; min-width: 0; max-width: 300px; }
.nb-cname { font-size: 11.5px; color: #5b6478; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-cpt { width: 76px; font-size: 12.5px; font-weight: 700; color: var(--navy); }
.nb-mod { width: 32px; font-size: 11.5px; font-weight: 600; } .nb-mod:not([value=""]):not(:placeholder-shown) { color: var(--navy); }
.nb-ihead .nb-lbl { font-size: 9.5px; }
.nb-dxn { margin-left: auto; }
/* ── the sheet's middle pane: what goes on the claim, in words ── */
.ss-codes { display: flex; flex-direction: column; gap: 2px; }
.ss-cg { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a92a6; margin: 8px 0 3px; }
.ss-cg:first-child { margin-top: 0; }
.ss-code { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: baseline; padding: 5px 10px; border-radius: 8px; background: #f7f8fb; font-size: 12.5px; }
.ss-code b { color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; } .ss-code b em { font-style: normal; font-weight: 600; color: #2b5fb8; margin-left: 2px; }
.ss-code span { color: var(--ink); min-width: 0; }
.ss-code i { grid-column: 2; font-style: normal; font-size: 11px; color: #8a92a6; }
.ss-code.none { grid-template-columns: 1fr; color: #8a92a6; }
/* claim line head: code and its name on one row, modifiers wide enough for two characters, chips on their own row */
.nb-ihead { gap: 8px 10px; }
.nb-code { flex: 1 1 260px; flex-direction: row; align-items: center; gap: 10px; max-width: none; }
.nb-cname { flex: 1; font-size: 12px; }
.nb-mod { width: 40px; }
.nb-dxn { margin-left: 0; }
.nb-ord, .nb-addon { flex-basis: 100%; margin-left: 26px; white-space: nowrap; }
.nb-ihead .np-qc-b { white-space: nowrap; }

.nb-chips { flex-basis: 100%; order: 10; display: flex; gap: 8px; align-items: center; margin-left: 26px; }
.nb-ord, .nb-addon { flex-basis: auto; margin-left: 0; }
.nb-ihead .np-x { order: 5; }

.nb-code { flex: 1 1 140px; min-width: 140px; }
.nb-ihead > .cpoe-in, .nb-ihead > .nb-lbl, .nb-ihead > .nb-dxn, .nb-ihead > .np-x, .nb-ihead > .np-qc-b, .nb-ihead > .nb-inum { flex-shrink: 0; }

.nb-amt { width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
.nb-claim .nb-total { grid-column: 1 / -1; font-size: 12px; color: #5b6478; } .nb-claim .nb-total b { color: var(--navy); font-size: 13px; }
.ss-code span u { text-decoration: none; float: right; color: #5b6478; font-variant-numeric: tabular-nums; margin-left: 8px; }
.ss-total { display: flex; justify-content: space-between; padding: 8px 10px 0; margin-top: 6px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: #5b6478; } .ss-total b { color: var(--navy); }

/* ── Claims page (Work › Claims): stages in order, rows in words ── */
.cl-page { max-width: 1240px; }
.cl-warn { color: #A64B2A; font-weight: 600; }
.cl-stages { display: flex; flex-direction: column; gap: 10px; }
.cl-stage { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cl-stage.z { opacity: .6; }
.cl-stage-h { display: flex; align-items: center; gap: 10px; padding: 12px 18px; }
.cl-stage-h b { font-size: 14.5px; } .cl-stage-h .cl-n { font-size: 13px; font-weight: 700; color: var(--navy); background: rgba(48,120,192,.12); border-radius: 999px; padding: 1px 9px; } .cl-stage-h i { font-size: 12.5px; color: #8a92a6; font-style: normal; }
.cl-dot { width: 10px; height: 10px; border-radius: 50%; background: #1c2333; } .cl-dot.w { background: #D97757; } .cl-dot.g { background: #8fc8a5; }
.cl-row { display: grid; grid-template-columns: 24px 1fr 90px 52px auto; gap: 12px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line-2); cursor: pointer; }
.cl-row:hover { background: #f7f8fb; }
.cl-ck input { width: 15px; height: 15px; accent-color: var(--navy); }
.cl-t { display: flex; align-items: baseline; gap: 8px; } .cl-t b { font-size: 14.5px; } .cl-t span { font-size: 12px; color: #5b6478; font-weight: 600; }
.cl-s { font-size: 12.5px; color: #8a92a6; margin-top: 2px; } .cl-s i { font-style: normal; color: #3d4659; } .cl-s em { font-style: normal; color: #A64B2A; font-weight: 600; }
.cl-amt { text-align: right; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.cl-age { font-size: 12px; color: #8a92a6; text-align: right; font-variant-numeric: tabular-nums; } .cl-age.w { color: #A64B2A; font-weight: 600; }
.cl-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 10px 18px; margin-top: 10px; background: #fafbfc; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; color: #5b6478; }
/* claim dossier */
.cd-wrap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cd-head { font-size: 13.5px; color: #3d4659; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .cd-head i { color: #8a92a6; font-style: normal; } .cd-head em { font-style: normal; color: #A64B2A; font-weight: 600; }
.cd-st { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-radius: 999px; padding: 2px 9px; background: #f1f3f6; color: #5b6478; }
.cd-st.st-paid { background: #e9f7ee; color: #1d7a3e; } .cd-st.st-hold, .cd-st.st-rejected, .cd-st.st-denied { background: rgba(217,119,87,.14); color: #A64B2A; } .cd-st.st-sent, .cd-st.st-accepted, .cd-st.st-queued { background: #eef3fd; color: #2b5fb8; }
.cd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cd-line { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; align-items: baseline; padding: 5px 8px; border-radius: 8px; background: #f7f8fb; margin-bottom: 3px; font-size: 12.5px; }
.cd-line b { color: var(--navy); } .cd-line i { font-style: normal; color: #5b6478; font-variant-numeric: tabular-nums; } .cd-line em { grid-column: 2; font-style: normal; font-size: 11px; color: #8a92a6; }
.cd-dxs { display: flex; flex-wrap: wrap; gap: 6px; } .cd-dx { font-size: 12px; background: #eef3fd; color: #2b5fb8; border-radius: 6px; padding: 2px 8px; font-weight: 600; }
.cd-prov { font-size: 12.5px; color: #3d4659; }
.cd-evs { display: flex; flex-direction: column; gap: 4px; } .cd-ev { display: grid; grid-template-columns: 110px 80px 1fr; gap: 8px; font-size: 12px; color: #5b6478; } .cd-ev b { color: var(--navy); } .cd-ev i { font-style: normal; }
.cd-x12 summary { font-size: 12.5px; color: #5b6478; cursor: pointer; } .cd-x12 pre { font-size: 11px; background: #f7f8fb; border-radius: 10px; padding: 10px; max-height: 260px; overflow: auto; }
.mv-payer { font-size: 12.5px; color: #3d4659; background: #f7f8fb; border-radius: 10px; padding: 8px 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .mv-payer em { font-style: normal; color: #A64B2A; font-weight: 700; }

/* a problem pulled onto the claim that the note has not addressed yet */
.np-needs { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #c0392b; border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.np-prob.np-needs-on { border-left-color: #c0392b; box-shadow: inset 4px 0 0 #c0392b; }
.np-prob.np-flash { animation: npflash 1.6s ease; } @keyframes npflash { 0% { background: rgba(217,119,87,.25); } 100% { background: transparent; } }
/* sheet: chart diagnoses list (two-way with the note) */
.ss-tgl { border: 0; background: #f1f3f6; font: inherit; font-size: 11.5px; font-weight: 600; color: #2b5fb8; border-radius: 999px; padding: 3px 10px; margin-left: 8px; cursor: pointer; letter-spacing: 0; text-transform: none; }
.ss-dxlist { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 10px; max-height: 260px; overflow: auto; border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; }
.ss-dx { display: grid; grid-template-columns: 18px 68px 1fr auto auto; gap: 8px; align-items: center; font-size: 12.5px; padding: 4px 6px; border-radius: 7px; cursor: pointer; }
.ss-dx:hover { background: #f7f8fb; } .ss-dx.on { background: #eef3fd; } .ss-dx.need { background: rgba(192,57,43,.08); }
.ss-dx input { width: 14px; height: 14px; accent-color: var(--navy); } .ss-dx b { color: var(--navy); } .ss-dx span { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-dx i { font-style: normal; font-size: 10px; font-weight: 700; color: #8a5b0e; background: rgba(245,158,11,.16); border-radius: 999px; padding: 1px 6px; } .ss-dx em { font-style: normal; font-size: 10px; font-weight: 800; color: #fff; background: #c0392b; border-radius: 999px; padding: 1px 7px; text-transform: uppercase; }
/* pre-flight fix buttons */
.ss-fixes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ss-fix { border: 1px solid #2b5fb8; background: #fff; color: #2b5fb8; font: inherit; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.ss-fix:hover { background: #2b5fb8; color: #fff; } .ss-fix:disabled { opacity: .5; }

/* claim header, redone: chip rows for place / rendering / ordering, one input row, a quiet footer */
.nb-claim { display: flex; flex-direction: column; gap: 9px; }
.nb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nb-k { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8b94a8; min-width: 62px; } .nb-k2 { min-width: 0; margin-left: 10px; }
.nb-chips { display: inline-flex; gap: 2px; background: #f1f3f6; border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.nb-chips button { border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 600; color: #5b6478; padding: 5px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.nb-chips button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(20,30,60,.12); } .nb-chips button:disabled { cursor: default; }
.nb-row-in { display: grid; grid-template-columns: 1.2fr 1.4fr .7fr; gap: 10px; }
.nb-row-in label { display: flex; flex-direction: column; gap: 3px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #8b94a8; min-width: 0; }
.nb-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 8px; }
.nb-claim .nb-total, .nb-claim .nb-npis { grid-column: auto; border: 0; padding: 0; }
.nb-claim .nb-time { align-self: flex-end; }

/* ── claim header: one strip of pills, one strip of small inputs ── */
.nb-claim { gap: 6px; padding: 8px 10px; }
.nb-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nb-sp { flex: 1; }
.nb-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px 4px 10px; font: inherit; cursor: pointer; transition: border-color .12s, background .12s; }
.nb-pill:hover { border-color: #b9c3d9; background: #f7f8fb; } .nb-pill:disabled { cursor: default; }
.nb-pill small { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8b94a8; }
.nb-pill b { font-size: 12.5px; color: var(--navy); font-weight: 700; white-space: nowrap; }
.nb-pill i { font-style: normal; font-size: 9px; color: #98a1b3; }
.nb-claim .nb-total { font-size: 12px; color: #5b6478; white-space: nowrap; } .nb-claim .nb-total b { font-size: 14px; color: var(--navy); margin-left: 4px; }
.nb-in { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 10px; background: #fff; flex: 1 1 160px; min-width: 0; }
.nb-in-s { flex: 0 0 auto; }
.nb-in small { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8b94a8; white-space: nowrap; }
.nb-in input { border: 0; background: transparent; padding: 4px 6px; font-size: 12.5px; min-width: 0; width: 100%; box-shadow: none; }
.nb-in-s input { width: 64px; text-align: right; }
.nb-claim .nb-npis { font-size: 10.5px; color: #98a1b3; white-space: nowrap; border: 0; padding: 0; }
.nb-claim .nb-time { display: none; }
.np-bf-menu .np-bf-i { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: transparent; padding: 7px 10px; border-radius: 8px; font: inherit; text-align: left; cursor: pointer; width: 100%; }
.np-bf-menu .np-bf-i:hover { background: #f1f3f6; } .np-bf-menu .np-bf-i.on { background: #eef3fd; }
.np-bf-menu .np-bf-i b { font-size: 12.5px; color: var(--ink); } .np-bf-menu .np-bf-i small { font-size: 10.5px; color: #8a92a6; }
.nb-payer { padding: 6px 12px; margin: 0 0 8px; }
/* resets so the strip is not touched by the older claim-header rules */
.nb-claim { display: flex !important; grid-template-columns: none; align-items: stretch; }
.nb-strip { justify-content: flex-start; width: 100%; }
.nb-claim label.nb-in { flex-direction: row; align-items: center; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--ink); font-weight: 500; gap: 6px; }
.nb-pill b, .nb-in input, .nb-claim .nb-total, .nb-claim .nb-npis { text-transform: none; letter-spacing: 0; }
.nb-payer { gap: 6px; } .nb-payer-why i { font-size: 11px; padding: 1px 7px; }

/* ── Review & sign: tighter, one header per pane, lines that never wrap ── */
.ss-dxlist[hidden], .ss-codes[hidden] { display: none !important; }
.ss-ph-seg { display: flex; align-items: center; }
.ss-seg { display: inline-flex; gap: 2px; background: #f1f3f6; border-radius: 10px; padding: 3px; text-transform: none; letter-spacing: 0; }
.ss-seg button { border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 600; color: #5b6478; padding: 4px 11px; border-radius: 8px; cursor: pointer; }
.ss-seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(20,30,60,.12); }
.ss-ph-claim { display: flex; align-items: center; gap: 10px; }
.nt-sheetov [data-billsec] .np-h { display: none; }
.ss-cg i { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; color: #a3aab8; margin-left: 4px; }
.ss-code { padding: 4px 8px; font-size: 12px; } .ss-code b { font-size: 12px; }
.ss-chk { padding: 8px 10px; } .ss-chk i { font-size: 11.5px; line-height: 1.4; }
/* claim lines: one row, the name gives way */
.nb-ihead { flex-wrap: nowrap; gap: 6px 8px; }
.nb-ihead .nb-chips { flex-wrap: wrap; }
.nb-item { border-left-width: 3px; }
.nb-code { flex: 1 1 120px; min-width: 90px; }
.nb-cpt { width: 66px; } .nb-cpt-sug { white-space: nowrap; padding: 4px 8px; font-size: 11px; }
.nb-mod { width: 30px; padding-left: 2px; padding-right: 2px; } .nb-qty { width: 30px; } .nb-amt { width: 62px; }
.nb-ihead .nb-lbl { display: none; }
.nb-mod::placeholder { color: #c3c9d6; }
.nb-dxn { font-size: 10px; padding: 2px 7px; white-space: nowrap; }
.nb-ihead .np-x { padding: 0 2px; }
.nb-payer { padding: 6px 10px; margin-bottom: 8px; border-radius: 10px; }
.nb-payer b { font-size: 13px; }
.nb-claim { padding: 8px 10px; margin-bottom: 8px; }

/* quality lines: code + its full name, nothing to type (no modifier, one unit, a penny) */
.nb-item.nb-q .nb-ihead { padding: 6px 10px; }
.nb-item.nb-q .nb-code { flex: 1 1 auto; }
.nb-item.nb-q .nb-cname { white-space: normal; font-size: 12.5px; color: var(--ink); }
.nb-item.nb-q .nb-cpt { width: 62px; }
.nb-cname { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }

/* quality lines keep every box (modifier, units, charge) — just smaller, so the full name fits */
.nb-item.nb-q .nb-code { flex: 1 1 160px; }
.nb-item.nb-q .nb-mod { width: 28px; } .nb-item.nb-q .nb-qty { width: 28px; } .nb-item.nb-q .nb-amt { width: 56px; font-size: 11.5px; }

/* smaller type on the claim lines, per Parth */
.nb-cname, .nb-item.nb-q .nb-cname { font-size: 10.5px; line-height: 1.2; }
.nb-dxrow { font-size: 11px; } .nb-dxrow b { font-size: 11px; } .nb-dxd { font-size: 11px; }
.nb-adddx .cpoe-in { font-size: 11px; padding: 4px 8px; }
.nb-cpt { font-size: 12px; }

/* ── visit scribe panel (scribe.js) ── */
.sc-panel { width: 440px; max-height: 80vh; }
.sc-h { gap: 8px; }
.sc-dot { width: 9px; height: 9px; border-radius: 50%; background: #c7ccd6; flex: none; }
.sc-dot.on { background: #d33; box-shadow: 0 0 0 4px rgba(221,51,51,.18); animation: scpulse 1.4s infinite; }
.sc-dot.busy { background: #2f6fed; }
@keyframes scpulse { 0%,100% { box-shadow: 0 0 0 3px rgba(221,51,51,.14);} 50% { box-shadow: 0 0 0 7px rgba(221,51,51,.05);} }
.sc-pt { font-weight: 600; color: #4a5060; font-size: 12px; }
.sc-hbtns { margin-left: auto; display: flex; gap: 6px; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 12px 2px; }
.sc-chip { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #eef1f6; color: #33405a; }
.sc-chip.quiet { font-weight: 500; color: #6b7280; }
.sc-chip.prob { background: #e8f0ff; color: #1e3fa0; } .sc-chip.med { background: #fff1e3; color: #8a4b0e; } .sc-chip.order { background: #eaf7ee; color: #1f6b3a; } .sc-chip.warn { background: #fdecea; color: #a52a1d; } .sc-chip.vitals { background: #e9f6f7; color: #145f6a; }
.sc-tabs { display: flex; gap: 2px; border-bottom: 1px solid #e3e7ef; margin: 0 -2px 6px; }
.sc-tabs button { border: 0; background: none; padding: 6px 9px; font-size: 12px; font-weight: 700; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; }
.sc-tabs button.on { color: #1f2a44; border-bottom-color: #2f6fed; }
.sc-tabs button i { font-style: normal; background: #d33; color: #fff; border-radius: 999px; font-size: 10px; padding: 0 5px; margin-left: 4px; }
.sc-tabs button i:empty { display: none; }
.sc-pane { overflow-y: auto; max-height: 46vh; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.sc-sec b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; margin-bottom: 2px; }
.sc-sec.warn b { color: #a52a1d; }
.sc-prob { padding: 4px 0; border-top: 1px dashed #e9edf3; }
.sc-prob.new { background: #f5f8ff; border-radius: 6px; padding: 5px 6px; }
.sc-row { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-top: 1px dashed #e9edf3; font-size: 12px; }
.sc-row:first-child { border-top: 0; }
.sc-row > span:nth-child(2) { flex: 1; }
.sc-row i { color: #6b7280; font-style: italic; }
.sc-row em { color: #1f6b3a; font-style: normal; font-size: 11px; }
.sc-k { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; background: #eef1f6; color: #33405a; flex: none; min-width: 52px; text-align: center; }
.sc-k.med { background: #fff1e3; color: #8a4b0e; } .sc-k.dx { background: #e8f0ff; color: #1e3fa0; } .sc-k.order { background: #eaf7ee; color: #1f6b3a; } .sc-k.warn { background: #fdecea; color: #a52a1d; } .sc-k.vitals { background: #e9f6f7; color: #145f6a; } .sc-k.history, .sc-k.allergy { background: #f3eefc; color: #5b3a9a; }
.sc-cands { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sc-dxq { width: 100%; margin-top: 4px; font-size: 12px; }
.sc-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-btns .cal-btn { font-size: 12px; }
.sc-empty { line-height: 1.5; }
.sc-model { font-size: 10.5px; text-align: right; }
.nt-scribepanel.busy .sp-st { color: #2f6fed; background: #e8f0ff; }

/* ── check-out window (checkout.js) ── */
.co-card { width: min(1180px, 96vw); height: min(780px, 90vh); display: flex; flex-direction: column; }
.co-head h2 { margin: 0; font-size: 17px; }
.co-sub { font-size: 12px; color: #6b7280; margin-top: 2px; }
.co-body { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.co-left { flex: 0 0 380px; min-width: 240px; overflow-y: auto; padding: 14px 16px; border-right: 0; background: #f7f8fb; display: flex; flex-direction: column; gap: 14px; }
.co-split { flex: 0 0 6px; cursor: col-resize; background: linear-gradient(#e3e7ef, #e3e7ef) center/1px 100% no-repeat; }
.co-split:hover { background: #dbe4ff; }
.co-right { flex: 1; min-width: 0; overflow-y: auto; padding: 14px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.co-right .co-tile:first-child { grid-column: 1 / -1; }
.co-sec .co-h { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #6b7280; margin-bottom: 6px; display: flex; gap: 6px; align-items: baseline; }
.co-dec, .co-row { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; padding: 5px 0; border-top: 1px dashed #e3e7ef; }
.co-dec:first-of-type, .co-row:first-of-type { border-top: 0; }
.co-row i { color: #6b7280; font-style: italic; font-size: 11px; }
.co-grow { flex: 1; min-width: 0; }
.co-k { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; background: #eef1f6; color: #33405a; flex: none; min-width: 48px; text-align: center; }
.co-dec.fu .co-k { background: #e8f0ff; color: #1e3fa0; } .co-dec.labs .co-k, .co-dec.order .co-k { background: #eaf7ee; color: #1f6b3a; } .co-dec.med .co-k { background: #fff1e3; color: #8a4b0e; } .co-dec.task .co-k { background: #f3eefc; color: #5b3a9a; }
.co-tile { border: 1px solid #e3e7ef; border-radius: 12px; padding: 12px 14px; background: #fff; box-shadow: 0 1px 2px rgba(20,30,60,.04); display: flex; flex-direction: column; gap: 8px; }
.co-th { font-weight: 800; font-size: 13.5px; color: #1f2a44; }
.co-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.co-chip { border: 1px solid #d9deea; background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; color: #33405a; cursor: pointer; }
.co-chip:hover { border-color: #9fb3e6; }
.co-chip.on { background: #1e3fa0; border-color: #1e3fa0; color: #fff; }
.co-chip:disabled { opacity: .55; cursor: default; }
.co-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.co-line > span:first-child { color: #6b7280; font-weight: 700; min-width: 74px; }
.co-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.co-actions .cal-btn { font-size: 12px; }
.co-pay { font-size: 12.5px; color: #33405a; }
.co-warn { color: #a52a1d; font-style: normal; font-weight: 700; }
.co-amt { width: 96px; }
.co-foot-l { font-size: 12px; color: #6b7280; }
.ca-st.done { background: #eaf7ee; color: #1f6b3a; }
.sc-k.fu { background: #e8f0ff; color: #1e3fa0; } .sc-k.task { background: #f3eefc; color: #5b3a9a; } .sc-chip.task { background: #f3eefc; color: #5b3a9a; }
@media (max-width: 980px) { .co-right { grid-template-columns: 1fr; } }
.ca-co { border: 1px solid rgba(30,63,160,.35); background: rgba(255,255,255,.85); color: #1e3fa0; border-radius: 999px; font-size: 10px; font-weight: 800; padding: 1px 7px; cursor: pointer; margin-left: 4px; line-height: 1.4; }
.ca-co:hover { background: #1e3fa0; color: #fff; }
.cal-appt.one .ca-co { padding: 0 6px; }
.sc-body[hidden], .sc-chips[hidden] { display: none !important; }
.nt-scribepanel.min { width: 300px; max-height: none; }
.nt-scribepanel.min .sc-h { cursor: pointer; }
.sc-h { user-select: none; }
.co-dec.act { cursor: pointer; border-radius: 8px; padding-left: 4px; padding-right: 4px; }
.co-dec.act:hover { background: #eef2fb; }
.co-dec.act.done { opacity: .55; }
.co-dec.act.done .co-go::before { content: '✓ '; }
.co-go { font-size: 11px; font-weight: 800; color: #1e3fa0; white-space: nowrap; }
.nt-scribebtn { position: relative; }
.nt-scribebtn.sc-live::after, .nt-scribebtn.sc-tucked::after { content: ''; position: absolute; top: -4px; right: -4px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; }
.nt-scribebtn.sc-live::after { background: #d33; box-shadow: 0 0 0 3px rgba(221,51,51,.18); animation: scpulse 1.4s infinite; }
.nt-scribebtn.sc-live { border-color: #d98b8b; }
.nt-scribebtn.sc-tucked::after { background: #2f6fed; }
.nt-scribepanel[hidden] { display: none !important; }
.sc-warn { color: #a52a1d; font-weight: 800; font-size: 11px; }
.pc-card { display: flex; flex-direction: column; gap: 6px; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pc-rows { display: flex; flex-direction: column; }
.pc-actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.pc-actions .cal-btn { font-size: 12px; }
.pa-compare { margin-left: 8px; }
.pa-sugg-chip.k-med { border-color: #e2c9a8; background: #fff7ec; } .pa-sugg-chip.k-order, .pa-sugg-chip.k-refer { border-color: #bfe0c8; background: #f0faf3; }
.pl-sug2-name { font-size: 11.5px; color: #3a465f; margin-top: 2px; line-height: 1.4; } .pl-sug2-rep { color: #6b7280; }

/* today's medication decisions inside a Medications row */
.np-mtag{display:inline;white-space:nowrap;font-style:normal;font-size:10px;font-weight:700;color:#8a5a00;background:#fff3d6;border-radius:6px;padding:0 5px;margin-left:4px;vertical-align:1px}
.np-mtag-stop,.np-mtag-hold{color:#8b1d1d;background:#fde8e8}
.np-tokmed.np-medtoday{border-bottom-style:dashed;cursor:default;white-space:nowrap}
.np-tokmed.np-medtoday:hover{background:none}
.np-vnote{flex-basis:100%;font-size:.8em;font-style:italic;color:#5b6472;padding:2px 4px}
/* Pending actions — the chart's "what is waiting on me" window */
/* the count on a header chip: the same quiet counter the rest of the EMR uses */
.pchip-n { display: inline-flex; align-items: center; justify-content: center; min-width: 15px; height: 15px; padding: 0 4px; margin-left: 2px; border-radius: 999px; background: var(--ink-2, #4b5563); color: #fff; font-size: 9.5px; font-weight: 700; line-height: 1; font-style: normal; }
.pdg-btn.has .pchip-n { background: #c2410c; }
.pdg-card { width: min(980px, 94vw); height: min(680px, 88vh); display: flex; flex-direction: column; }
.pdg-head { gap: 8px; } .pdg-head h2 { margin: 0; font-size: 17px; } .pdg-pt { color: #6b7280; font-size: 13px; }
.pdg-body { flex: 1; overflow: auto; padding: 10px 14px 16px; }
.pdg-sec { margin-bottom: 16px; padding: 8px 10px 4px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fafbfc; }
.pdg-h { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #6b7280; margin: 8px 0 6px; display: flex; gap: 6px; align-items: center; }
.pdg-h i, .pdg-h svg { width: 14px; height: 14px; } .pdg-h span { color: #9ca3af; font-weight: 600; }
.pdg-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid #eceef2; border-radius: 9px; margin-bottom: 4px; background: #fff; }
.pdg-row.sel { border-color: #93c5fd; background: #eff6ff; } .pdg-row.pdg-task { cursor: default; background: #fafafa; }
.pdg-row input[type=checkbox] { width: 15px; height: 15px; margin: 0; }
.pdg-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pdg-t { font-weight: 600; font-size: 13.5px; } .pdg-s { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11.5px; color: #6b7280; }
.pdg-chip { padding: 1px 7px; border-radius: 7px; background: #f3f4f6; color: #374151; font-weight: 600; font-size: 11px; }
.pdg-dx { background: #eef2ff; color: #3730a3; } .pdg-verbal { background: #fff7ed; color: #9a3412; }
.pdg-why { font-style: italic; }
.pdg-a { display: flex; gap: 5px; flex-shrink: 0; }

/* Stickies — internal notes on the chart, never part of the record */
.stk-card { width: min(720px, 94vw); height: min(620px, 86vh); display: flex; flex-direction: column; }
.stk-head { gap: 8px; } .stk-head h2 { margin: 0; font-size: 17px; } .stk-pt { color: #6b7280; font-size: 13px; }
.stk-banner { margin: 0 14px; padding: 7px 10px; border-radius: 8px; background: #fefce8; border: 1px dashed #fde68a; color: #854d0e; font-size: 12px; }
.stk-new { margin: 10px 14px 4px; display: flex; flex-direction: column; gap: 6px; }
.stk-new textarea { width: 100%; box-sizing: border-box; border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; resize: vertical; }
.stk-new-r { display: flex; align-items: center; gap: 8px; }
.stk-colors { display: flex; gap: 6px; } .stk-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.stk-dot.on { border-color: #111827; } .stk-dot.yellow, .stk-note.yellow { background: #fef3c7; } .stk-dot.blue, .stk-note.blue { background: #dbeafe; } .stk-dot.green, .stk-note.green { background: #dcfce7; } .stk-dot.pink, .stk-note.pink { background: #fce7f3; }
.stk-body { flex: 1; overflow: auto; padding: 8px 14px 16px; }
.stk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.stk-note { border-radius: 4px 4px 12px 4px; padding: 10px 10px 6px; box-shadow: 0 2px 6px rgba(0,0,0,.10), 0 8px 18px -10px rgba(0,0,0,.25); transform: rotate(-.4deg); display: flex; flex-direction: column; gap: 6px; min-height: 96px; }
.stk-note:nth-child(even) { transform: rotate(.5deg); } .stk-note.pinned { outline: 2px solid #f59e0b; }
.stk-txt { font-size: 13.5px; line-height: 1.35; white-space: pre-wrap; outline: none; flex: 1; font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif; }
.stk-txt:focus { background: rgba(255,255,255,.55); border-radius: 6px; }
.stk-meta { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: #78716c; }
.stk-ib { border: 0; background: transparent; cursor: pointer; font-size: 12px; padding: 0 3px; opacity: .7; } .stk-ib:hover { opacity: 1; }
/* Header add-chips (Tag · Pending · Stickies): quiet outlined pills, one family with the rest of the subhead */
#pDemo .pchip-add { background: #fff; border: 1px solid var(--line, #dfe3ea); color: var(--ink-2, #3f4754); font-weight: 600; gap: 5px; padding: 0 10px 0 8px; box-shadow: none; }
#pDemo .pchip-add svg, #pDemo .pchip-add i { width: 12px; height: 12px; stroke-width: 2.2; color: var(--ink-3, #6b7280); }
#pDemo .pchip-add:hover { background: #f5f7fa; border-color: #c9d1dc; color: var(--ink, #111827); }
#pDemo .pchip-add:hover svg { color: var(--ink, #111827); }
#pDemo .pchip-n { background: #eef0f3; color: #4b5563; min-width: 16px; height: 16px; font-size: 10px; margin-left: 1px; }
#pDemo .pdg-btn.has .pchip-n { background: #c2410c; color: #fff; }
#pDemo .pdg-btn.has { border-color: #f1c9b3; }
/* Tell WellPlus · Outside Care · New Visit Note share the doctool chip's exact box (5×11 padding, 11.5px, 9px radius) */
.subhead .sactions .btn-ghost, .subhead-main .sactions .btn-ghost, .subhead .sactions .btn-primary, .subhead-main .sactions .btn-primary { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; font-size: 11.5px; font-weight: 600; line-height: 1.25; border-radius: 9px; box-shadow: none; white-space: nowrap; }
.subhead .sactions .btn-ghost { background: rgba(48,120,192,.06); border: 1px solid transparent; color: var(--ink); }
.subhead .sactions .btn-ghost:hover { background: rgba(48,120,192,.14); border-color: rgba(48,120,192,.28); color: var(--navy); }
.subhead .sactions .btn-ghost svg, .subhead .sactions .btn-ghost i, .subhead .sactions .btn-primary svg, .subhead .sactions .btn-primary i { width: 14px; height: 14px; }
.subhead .sactions .btn-primary:hover { box-shadow: 0 2px 8px rgba(24,36,96,.22); }
.doctools-row .sactions { align-items: center; }
.doctools-row .sactions .btn-ghost, .doctools-row .sactions .btn-primary { align-self: center; height: 27px; min-height: 27px; }
/* RISK reads in the same orange family as the allergy pill; the Stickies icon is a yellow sticky note */
.subhead .badge-risk, .badge-risk { background: var(--attn-bg, rgba(217,119,87,.14)); color: var(--attn-text, #A64B2A); border: 1px solid var(--attn-border, rgba(217,119,87,.45)); }
#pDemo .stk-btn svg { color: #ca8a04; fill: #fef08a; stroke-width: 2; }
#pDemo .stk-btn:hover svg { color: #a16207; fill: #fde047; }
.subhead .badge-risk, .badge-risk { background: var(--attn, #D97757); color: #fff; border: 1px solid var(--attn, #D97757); }
.subhead .badge-risk:hover { background: var(--attn-text, #C2603F); }
/* Record vitals — several BP readings on one day, each with a word next to it */
.vm-card { width: min(560px, 94vw); }
.vm-sec { margin: 10px 0 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #6b7280; }
.vm-bp { display: grid; grid-template-columns: 78px 78px 1fr 26px; gap: 6px; align-items: center; margin-bottom: 6px; }
.vm-bp input { width: 100%; box-sizing: border-box; } .vm-bp .vm-x { border: 0; background: transparent; color: #9ca3af; cursor: pointer; font-size: 14px; } .vm-bp .vm-x:hover { color: #b91c1c; }
.vm-bp .vm-cm { font-size: 12px; } .vm-slash { text-align: center; color: #9ca3af; }
.vm-add { font-size: 12px; }
.vm-body { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.vm-hint { font-size: 11px; color: #6b7280; margin-top: 2px; } .vm-hint b { color: #374151; }
.vm-bmi { font-size: 18px; font-weight: 700; color: #111827; padding-top: 4px; } .vm-bmi small { font-size: 11px; font-weight: 600; color: #6b7280; margin-left: 4px; }
.vrt-when { font-size: 9.5px; color: #6b7280; margin-left: 3px; font-weight: 600; }
/* RISK in its own violet — orange belongs to allergies */
.subhead .badge-risk, .badge-risk { background: #6558d3; color: #fff; border: 1px solid #6558d3; }
.subhead .badge-risk:hover { background: #5347b8; }
/* Chart identity on one line: a small initials badge beside the name, chips flowing to the right */
.subhead-main { flex-wrap: nowrap; align-items: center; gap: 10px; }
.subhead-main .avatar, .subhead-main #pAvatar { width: 30px; height: 30px; min-width: 30px; border-radius: 9px; font-size: 11.5px; letter-spacing: .02em; box-shadow: none; }
.subhead-id { gap: 10px; }
.subhead-id h1 { font-size: 17px; line-height: 1.2; }
.subhead-id .demo { row-gap: 4px; }

/* Header: identity + quiet demographics; status pills on a second aligned row on laptops, one row on wide screens */
.subhead-main .avatar, .subhead-main #pAvatar { display: none; }
.pchip-demo { color: var(--ink-2); font-size: 12px; } .pchip-demo b { color: var(--ink); font-weight: 700; }
.pchip-sep { font-style: normal; color: #c3c8d1; margin: 0 6px; }
.pchip-br { display: none; }
@media (max-width: 1500px) { .pchip-br { display: block; flex-basis: 100%; height: 0; } .subhead-id { flex-wrap: wrap; } .subhead-id h1 { flex-basis: auto; } }
#pDemo .pchip-ico { padding: 0 7px; } #pDemo .pchip-ico svg { width: 13px; height: 13px; }
#pDemo .pchip-w { display: none; }                      /* the word lives in the tooltip; the icon + count carry it */
@media (min-width: 1700px) { #pDemo .pchip-w { display: inline; } }
#pDemo .pdg-btn, #pDemo .stk-btn { padding: 0 8px 0 7px; gap: 3px; }
@media (max-width: 1500px) { #pDemo .pchip-div { display: none; } .subhead-id .demo { row-gap: 5px; } }

/* Identity row: ONE row. Nothing wraps; if a screen is too narrow the next-visit chip at the end clips first. */
.subhead-id { flex-wrap: nowrap; overflow: hidden; }
.subhead-id h1 { font-size: 16px; flex: 0 0 auto; }
.subhead-id .demo { flex-wrap: nowrap; overflow: hidden; gap: 5px; row-gap: 0; min-width: 0; }
.subhead-id .demo > * { flex-shrink: 0; }
#pDemo .pchip-appt { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pDemo .pchip-div { display: inline-block; }
.pchip-sep { margin: 0 5px; }
/* The name wears the navy box the initials badge used to — the one distinct element in the row */
.subhead-id h1, .subhead-id h1.clickable-name { display: inline-flex; align-items: center; height: 27px; padding: 0 11px; border-radius: 9px; background: var(--navy-grad, linear-gradient(135deg, #1e2e60, #2b3f7e)); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; box-shadow: 0 1px 4px rgba(24,36,96,.18); cursor: pointer; margin: 0; }
.subhead-id h1.clickable-name:hover { filter: brightness(1.08); }
/* Vitals: two rows of five compact tiles */
.vit-flow { display: flex; flex-wrap: wrap; column-gap: 10px; row-gap: 3px; align-items: baseline; }   /* tiles keep their own width: 2 rows at 330px, more rows when dragged narrower, never overlapping */
.vit-flow .vrt { flex: 0 0 auto; min-width: 0; overflow: visible; white-space: nowrap; }
.vrt { padding: 0 2px; gap: 3px; white-space: nowrap; }
.vrt-l { font-size: 9.5px; letter-spacing: .2px; } .vrt-v { font-size: 12.5px; } .vrt-u { font-size: 9.5px; font-weight: 600; color: var(--ink-3); }
.vrt-t, .vrt-when { font-size: 9px; }
.vrt.vrt-wide { grid-column: span 1; }

/* Coverage window */
.cov-card { width: min(640px, 94vw); max-height: 86vh; display: flex; flex-direction: column; } .cov-pt { color: #6b7280; font-size: 13px; margin-left: 8px; }
.cov-body { overflow: auto; padding: 10px 16px 16px; }
.cov-pol { border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; background: #fff; }
.cov-h { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; } .cov-h b { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; } .cov-h span { font-weight: 700; font-size: 14px; }
.cov-dl { display: grid; grid-template-columns: 140px 1fr; gap: 3px 10px; margin: 0; font-size: 13px; } .cov-dl dt { color: #6b7280; } .cov-dl dd { margin: 0; font-weight: 600; }
.cov-elig { margin-top: 4px; }
#pDemo .pchip-ins { cursor: pointer; } #pDemo .pchip-ins:hover { filter: brightness(.96); }

.np-sys-neg { font-size: 11.5px; color: #6b7280; font-style: italic; }

/* Medicare AWV — Health Risk Assessment card */
.hra { border: 1px solid #e5e7eb; border-radius: 12px; padding: 8px 12px 10px; background: #fff; }
.hra-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.hra-sec { border-top: 1px solid #f0f2f5; padding: 6px 0 2px; }
.hra-h { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #4b5563; cursor: pointer; display: flex; gap: 6px; align-items: baseline; padding: 4px 0; }
.hra-car { color: #9ca3af; font-size: 11px; }
.hra-q { display: grid; grid-template-columns: 26px minmax(180px, 1fr) minmax(0, 1.6fr); gap: 4px 8px; align-items: center; padding: 3px 0; border-bottom: 1px dashed #f1f3f6; }
.hra-q.hra-sub { padding-left: 10px; } .hra-q.hra-sub .hra-n { visibility: hidden; }
.hra-n { font-size: 11px; font-weight: 700; color: #6b7280; text-align: right; }
.hra-l { font-size: 12.5px; color: #1f2937; }
.hra-a { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.hra-chips { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.hra-chips .np-chip { padding: 2px 8px; font-size: 11.5px; }
.hra-in { border: 1px solid #e5e7eb; border-radius: 7px; padding: 3px 7px; font: inherit; font-size: 12px; }
.hra-mini { display: inline-flex; align-items: center; gap: 5px; margin: 1px 8px 1px 0; font-size: 11.5px; color: #4b5563; }
.hra-score { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 7px; background: #eef2ff; color: #3730a3; font-size: 11.5px; font-weight: 600; }
.hra-prev { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 14px; }
.hra-pv { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px dashed #f1f3f6; }
.hra-st { border: 1px solid transparent; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; cursor: pointer; }
.hra-st.st-uptodate { background: #dcfce7; color: #166534; } .hra-st.st-recommended { background: #fff7ed; color: #9a3412; } .hra-st.st-declined { background: #f3f4f6; color: #374151; } .hra-st.st-na { background: #f3f4f6; color: #9ca3af; }
.hra.ro .np-chip, .hra.ro .hra-st { pointer-events: none; }
.hra-inst { margin: 4px 0 6px 26px; padding: 6px 10px; border: 1px solid #e8ebf0; border-radius: 10px; background: #fafbfc; }
.hra-inst-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; font-size: 12px; } .hra-inst-h b { font-weight: 700; color: #1f2937; }
.hra-inst .hra-q { grid-template-columns: 0 minmax(200px, 1.3fr) minmax(0, 1.7fr); }
.hra-score.pos { background: #fee2e2; color: #991b1b; } .hra-score.dim { background: #f3f4f6; color: #6b7280; font-weight: 500; }
.hra-pvl { display: flex; flex-direction: column; gap: 1px; } .hra-why { font-size: 11px; color: #6b7280; font-weight: 500; }
.np-sys-neg[contenteditable=true] { cursor: text; border-radius: 4px; padding: 0 3px; } .np-sys-neg[contenteditable=true]:hover { background: #f5f7fa; } .np-sys-neg[contenteditable=true]:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px #c7d2fe; font-style: normal; color: #111827; }

.cal-appt.lane .ca-meta { display: none; } .cal-appt.lane .ca-name { max-width: 60%; overflow: hidden; text-overflow: ellipsis; }

/* Users & access */
.usr-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.usr-tbl th { text-align: left; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.usr-tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.usr-tbl tr.off td { opacity: .55; }
.usr-tbl code { font-family: var(--mono); font-size: 12px; background: #f3f5f9; border-radius: 5px; padding: 2px 6px; }
.usr-tbl select { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; background: #fff; }
.usr-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.usr-sub.warn { color: #9a5b00; }
.usr-acts { white-space: nowrap; text-align: right; }
.usr-acts .cal-btn + .cal-btn { margin-left: 6px; }
.cal-btn.sm { font-size: 11.5px; padding: 4px 9px; }
.usr-temp { display: grid; gap: 8px; margin: 10px 0 12px; padding: 12px 14px; background: #f7f8fb; border: 1px dashed #c9d2e6; border-radius: 12px; }
.usr-temp small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.usr-temp b { font-size: 15px; font-family: var(--mono); color: var(--navy); user-select: all; }

/* ===== Calendar, second pass: quiet cards, one colour rail, time on the left ===== */
@keyframes calIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
/* The whole bubble is the visit's colour, mixed from the one property the calendar sets (--c).
   Every surface, edge and label is derived from it, so a glance down the day reads as colour
   rather than as a row of white boxes with a stripe.

   Hover is paint only — fill, edge, shadow. It must never change geometry: the card used to lift
   a pixel and grow taller, which slid it out from under the pointer, dropped the hover, snapped it
   back, and flickered. */
.cal-appt {
  --c: var(--navy, #1B2B5B);
  --fill: color-mix(in oklab, var(--c) 30%, #fff);
  --fill-hi: color-mix(in oklab, var(--c) 41%, #fff);
  --edge: color-mix(in oklab, var(--c) 46%, #fff);
  --ink-c: color-mix(in oklab, var(--c) 34%, #101728);
  --ink-c2: color-mix(in oklab, var(--c) 46%, #3d4658);
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--fill);
  border: 1px solid var(--edge);
  border-left: 3px solid var(--c);
  border-radius: 10px; padding: 5px 9px;
  box-shadow: 0 1px 1px rgba(24,36,96,.04);
  animation: calIn .22s ease-out both; line-height: 1.3;
  transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease;
  contain: paint;
}
.cal-appt:hover {
  background: var(--fill-hi);
  border-color: color-mix(in oklab, var(--c) 48%, #fff);
  border-left-color: var(--c);
  box-shadow: 0 6px 16px -8px color-mix(in oklab, var(--c) 60%, transparent);
}
.cal-appt:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px color-mix(in oklab, var(--c) 62%, #fff); }
@media (prefers-reduced-motion: reduce) { .cal-appt { animation: none; } }
.cal-appt .ca-t { flex: 0 0 40px; font-size: 10.5px; font-weight: 700; color: color-mix(in oklab, var(--c) 62%, #6b7280); font-variant-numeric: tabular-nums; padding-top: 2px; letter-spacing: -.01em; }
.cal-appt .ca-b { flex: 1; min-width: 0; }
.cal-appt .ca-row { display: flex; align-items: center; gap: 6px; }
.cal-appt .ca-name { font-size: 12.5px; font-weight: 680; letter-spacing: -.01em; color: var(--ink-c); flex: 0 1 auto; }
.cal-appt .ca-who { font-size: 10.5px; font-weight: 600; color: var(--ink-c2); white-space: nowrap; }
.cal-appt .ca-badges { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cal-appt .ca-sub { display: flex; align-items: center; font-size: 10.5px; color: var(--ink-c2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-appt .ca-dot { display: none; }
.cal-appt .ca-meta { display: flex; align-items: center; gap: 6px; font-size: 10px; color: color-mix(in oklab, var(--c) 42%, #6b7280); margin-top: 1px; white-space: nowrap; overflow: hidden; }
.ca-gl { display: inline-flex; gap: 4px; margin-left: auto; padding-left: 6px; }
.ca-gl span { font-size: 9px; font-weight: 800; letter-spacing: .02em; border-radius: 5px; padding: 1px 5px; background: #eef0f4; color: #4b5563; white-space: nowrap; }
.ca-gl .r { color: #0b6b6b; background: #e3f4f4; } .ca-gl .g { color: #9a5b00; background: #fff4e0; } .ca-gl .h { color: #b42318; background: #fde8e7; } .ca-gl .n { color: #5b3fc4; background: #efeafc; }
.ca-st { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 700; padding: 0; background: transparent; color: var(--ink-3); white-space: nowrap; }
.ca-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.ca-st.ok { color: #9a5b00; } .ca-st.room { color: #2766a8; } .ca-st.done { color: #12703a; } .ca-st.bad { color: #b42318; }
.cal-appt .ca-co { opacity: 0; transition: opacity .12s; }
.cal-appt:hover .ca-co, .cal-appt.st-arrived .ca-co, .cal-appt.st-in_room .ca-co { opacity: 1; }
/* Arrived and in-room are states of THIS visit, so they deepen its own colour and add a ring
   rather than swapping in an unrelated amber or blue. Finished visits recede; cancelled goes grey
   because it is no longer a visit of any colour. */
.cal-appt.st-arrived { --fill: color-mix(in oklab, var(--c) 40%, #fff); box-shadow: inset 0 0 0 1px #d97706, 0 1px 1px rgba(24,36,96,.04); }
.cal-appt.st-arrived:hover { box-shadow: inset 0 0 0 1px #d97706, 0 6px 16px -8px color-mix(in oklab, var(--c) 60%, transparent); }
.cal-appt.st-in_room { --fill: color-mix(in oklab, var(--c) 46%, #fff); box-shadow: inset 0 0 0 1px #2766a8, 0 1px 1px rgba(24,36,96,.04); }
.cal-appt.st-in_room:hover { box-shadow: inset 0 0 0 1px #2766a8, 0 6px 16px -8px color-mix(in oklab, var(--c) 60%, transparent); }
.cal-appt.st-seen, .cal-appt.st-checked_out { --fill: color-mix(in oklab, var(--c) 12%, #fff); opacity: .8; }
.cal-appt.st-seen .ca-name, .cal-appt.st-checked_out .ca-name { font-weight: 600; }
.cal-appt.st-cancelled, .cal-appt.st-no_show { --c: #8b93a6; opacity: .5; }
.cal-appt.st-cancelled .ca-name { text-decoration: line-through; }
.cal-appt.one { align-items: center; padding-top: 0; padding-bottom: 0; }
.cal-appt.one .ca-b { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cal-appt.one .ca-sub { flex: 1; min-width: 0; margin-left: 0; }
.cal-appt.one .ca-t { padding-top: 0; }
.cal-appt.lane .ca-who, .cal-appt.lane .ca-meta { display: none; }
.cal-hour { background-image: linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(24,36,96,.05) 50%, transparent calc(50% + 0.5px)); border-bottom: 1px solid rgba(24,36,96,.07); }
.cal-colbody, .cal-grid.is-week .cal-cols .cal-col, .cal-grid.is-provs .cal-cols .cal-col { border-left-color: rgba(24,36,96,.07); }
.cal-now { height: 2px; background: #e5484d; z-index: 5; box-shadow: 0 0 0 1px rgba(255,255,255,.7); }
.cal-now::before { left: -5px; top: -4px; width: 10px; height: 10px; box-shadow: 0 0 0 3px rgba(229,72,77,.18); }
.cal-now::after { content: attr(data-t); position: absolute; right: 6px; top: -9px; font-size: 9.5px; font-weight: 800; color: #fff; background: #e5484d; border-radius: 5px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
.cal-hourlbl.now { color: #e5484d; font-weight: 800; }
.cal-hourlbl { font-size: 10.5px; }
.cal-col.wkend-empty { flex: 0 0 34px !important; }
.cal-col.wkend-empty .cal-colhead { font-size: 9.5px; flex-direction: column; gap: 0; }
.cal-col.wkend-empty .cal-colhead b { font-size: 11px; }
.cal-col.wkend-empty .cal-colbody { background: repeating-linear-gradient(135deg, rgba(20,30,60,.035) 0 5px, transparent 5px 10px); }
.cal-col.wkend-empty .cal-hour { background-image: none; border-bottom-color: transparent; }
.cal-who button small { font-size: 9.5px; font-weight: 800; color: #fff; background: #98a1b3; border-radius: 999px; padding: 0 5px; margin-left: 5px; vertical-align: 1px; }
.cal-who button.on small { background: var(--navy); }
.cal-who button.loc.on small { background: rgba(255,255,255,.35); }
.cal-keywrap { position: relative; display: inline-flex; }
.cal-key { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px -14px rgba(24,36,96,.4); padding: 10px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; min-width: 300px; font-size: 12px; color: var(--ink); }
.cal-key span { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.cal-key i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.cal-key-n { grid-column: 1 / -1; font-size: 11px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
.cal-legend { display: none; }
.cal-card:not(.cal-expanded) .cal-who button small { display: none; }
@media (prefers-reduced-motion: reduce) { .cal-appt { animation: none; } }
.cal-key[hidden] { display: none; }
.cal-grid.is-week .cal-appt .ca-t { flex-basis: 34px; }
.cal-grid.is-week .cal-appt .ca-who, .cal-grid.is-week .ca-gl .n { display: none; }
.cal-grid.is-week .cal-appt .ca-name { font-size: 12px; }

/* ===== Check-in window ===== */
.ci-card { width: min(1020px, 96vw); height: min(760px, 92vh); display: flex; flex-direction: column; }
.ci-head { align-items: flex-start; } .ci-head-acts { display: flex; align-items: center; gap: 6px; }
.ci-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px; }
.ci-steps { display: flex; gap: 0; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.ci-step { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #98a1b3; padding: 6px 8px; background: #f7f8fb; }
.ci-step + .ci-step { border-left: 1px solid var(--line); }
.ci-step i { width: 7px; height: 7px; border-radius: 50%; background: #c9d2e6; }
.ci-step.done { color: #12703a; } .ci-step.done i { background: #16a34a; }
.ci-step.now { color: #fff; background: var(--navy); } .ci-step.now i { background: #fff; }
.ci-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ci-sec { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ci-sec.ok { border-color: rgba(22,163,74,.35); box-shadow: inset 3px 0 0 #16a34a; }
.ci-sec h4 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; color: var(--navy); margin: 0 0 10px; flex-wrap: wrap; }
.ci-n { width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.ci-sec.ok .ci-n { background: #16a34a; }
.ci-ok { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.ci-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ci-fields label { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.ci-fields label.wide { grid-column: 1 / -1; } .ci-fields label.sm { }
.ci-fields input { font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; background: #fff; }
.ci-fields input:focus { outline: none; border-color: #3480C3; box-shadow: 0 0 0 3px rgba(52,128,195,.18); }
.ci-fields input.saved { border-color: #16a34a; background: #f0faf4; }
.ci-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; }
.ci-elig { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: #f7f8fb; font-size: 12.5px; color: var(--ink); }
.ci-elig.ok { background: #e7f6ec; } .ci-elig.bad { background: #fde8e7; }
.ci-elig em { font-style: normal; font-weight: 700; color: #b42318; }
.ci-pay { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ci-amt { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 700; color: var(--navy); }
.ci-amt input { width: 92px; font: inherit; font-size: 16px; font-weight: 700; color: var(--navy); border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px; }
.ci-methods { display: flex; gap: 6px; flex-wrap: wrap; }
.ci-paid { margin-left: auto; font-size: 11.5px; font-weight: 700; color: #12703a; }
.ci-stripe { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #f1f6fd; }
.ci-stripe-h { font-size: 12px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.ci-stripe-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ci-wait { font-size: 11.5px; color: var(--ink-3); margin-left: 4px; }
.ci-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.ci-forms label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.ci-forms label small { color: var(--ink-3); font-size: 11px; margin-left: 2px; }
.ci-forms label.on small { color: #12703a; }
.ci-foot { justify-content: space-between; }
@media (max-width: 900px) { .ci-grid { grid-template-columns: 1fr; } }

/* ===== Check-out, second pass: what is settled reads as settled ===== */
.co-left { background: #f7f8fb; gap: 12px; }
.co-steps { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; }
.co-step { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.co-step i { width: 8px; height: 8px; border-radius: 50%; background: #d9deea; flex: none; }
.co-step.done { color: #12703a; } .co-step.done i { background: #16a34a; }
.co-tile { border-radius: 14px; gap: 9px; }
.co-tile.ok { border-color: rgba(22,163,74,.3); box-shadow: inset 3px 0 0 #16a34a, 0 1px 2px rgba(20,30,60,.04); }
.co-th { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.co-i { width: 9px; height: 9px; border-radius: 50%; background: #9aa3b8; flex: none; }
.co-i.fu { background: #2b5fb8; } .co-i.pay { background: #16a34a; } .co-i.print { background: #6b7280; } .co-i.task { background: #7c3aed; }
.co-done { margin-left: auto; font-size: 11.5px; font-weight: 700; color: #12703a; background: #e7f6ec; border-radius: 999px; padding: 2px 9px; }
.co-settled { font-size: 13px; color: var(--ink); background: #f0faf4; border-radius: 10px; padding: 8px 11px; display: grid; gap: 3px; }
.co-settled b { font-size: 15px; color: #12703a; }
.co-payform[hidden] { display: none; }
.co-tile.ok .co-payform { border-top: 1px dashed var(--line); padding-top: 9px; }
.co-sec .co-h { color: #8a92a6; }

/* ── Work rows: an open kind gets the weight, a watching kind gets one quiet line ── */
.aw .aw-k { align-items: center; row-gap: 0; }
.aw .aw-k .aw-m { min-width: 0; }
.aw .aw-k .aw-s { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.aw .aw-k .aw-n { align-self: center; }

.aw .aw-k.quiet { padding: 9px 22px; }
.aw .aw-k.quiet .aw-m b { font-size: 13.5px; font-weight: 600; color: #5b6478; }
.aw .aw-k.quiet .aw-s { font-size: 12px; color: #a3aab8; -webkit-line-clamp: 1; margin-top: 1px; }
.aw .aw-k.quiet .aw-n { display: none; }
.aw .aw-k.quiet .aw-bar { display: none; }
.aw .aw-k.quiet .aw-go.q { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #a3aab8; background: #f4f5f8; border-radius: 999px; padding: 3px 9px; min-width: 0; }
.aw .aw-k.quiet:hover .aw-m b { color: #1c2333; }
.aw .aw-k.quiet:hover .aw-go.q { background: #e8ebf2; color: #6b7280; }
/* the watching rows sit together at the foot of their column, under a hairline */
.aw .aw-k.quiet + .aw-k:not(.quiet) { border-top: 1px solid #f1f3f6; }
.aw .aw-col .aw-k:not(.quiet) + .aw-k.quiet { border-top: 1px solid #e6e9f0; }

.aw-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.aw .aw-col h3 { gap: 12px; }
.aw .aw-col h3 .aw-cc { white-space: nowrap; }

/* ===== Claims: the money first, the pipeline under it ===== */
.cl-page .wk-sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.cl-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 14px 0 12px; }
.cl-kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 1px 2px rgba(24,36,96,.04); }
.cl-kpi b { font-size: 24px; font-weight: 700; letter-spacing: -.03em; color: var(--navy); line-height: 1.05; font-variant-numeric: tabular-nums; }
.cl-kpi b.money { font-size: 21px; }
.cl-kpi span { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.cl-kpi i { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 1px; }
.cl-kpi.warn b { color: #A64B2A; } .cl-kpi.ok b { color: #12703a; }
.cl-banner { display: flex; align-items: center; gap: 14px; background: #fff8ea; border: 1px solid rgba(154,91,0,.25); border-radius: 12px; padding: 11px 15px; font-size: 13px; color: #6b4a12; margin-bottom: 12px; }
.cl-banner b { color: #7a4d00; } .cl-banner .cal-btn { margin-left: auto; white-space: nowrap; }
.cl-stage-h .cl-sum { font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cl-stage-h i { font-style: normal; font-size: 12px; color: var(--ink-3); margin-left: auto; }
.cl-stage.cl-empty { background: #fafbfc; }
.cl-emptyh { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #a3aab8; padding: 11px 18px 6px; }
.cl-erow { display: flex; align-items: center; gap: 10px; padding: 7px 18px; font-size: 13px; color: #5b6478; border-top: 1px solid #eef0f4; }
.cl-erow:first-of-type { border-top: 0; }
.cl-erow b { font-weight: 600; }
.cl-erow i { font-style: normal; font-size: 12px; color: #a3aab8; }
.cl-erow .cl-ez { margin-left: auto; font-size: 12px; font-weight: 700; color: #c3c9d6; font-variant-numeric: tabular-nums; }
.cl-none { background: #fff; border: 1px dashed #c9d2e6; border-radius: 14px; padding: 26px; text-align: center; font-size: 13.5px; color: var(--ink-3); }
.cl-none b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 3px; }
.cl-bar[hidden] { display: none !important; }
@media (max-width: 1100px) { .cl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===== Orders to sign: same type scale as the rest of Home ===== */
#qDetail .osq-head { gap: 10px; padding: 12px 16px 6px; }
#qDetail .osq-big { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
#qDetail .osq-big b { font-size: 17px; font-weight: 700; color: #A64B2A; margin-right: 2px; }
#qDetail .osq-seg button { font-size: 12px; font-weight: 600; padding: 4px 10px; }
#qDetail .osq-keys { font-size: 11px; }
#qDetail .os-list { gap: 10px; padding: 8px 16px 4px; }
#qDetail .os-grp-h { padding: 7px 14px; font-size: 10.5px; }
#qDetail .os-grp-h b { font-size: 10.5px; font-weight: 800; }
#qDetail .os-grp-h > span:not(.sp-sp) { font-size: 10.5px; padding: 1px 7px; }
#qDetail .os-grp-h .cal-btn.sm { font-size: 11px; padding: 3px 9px; min-height: 0; }
#qDetail .os-row { padding: 8px 14px; gap: 10px; }
#qDetail .os-t { font-size: 12.5px; font-weight: 500; color: var(--ink); }
#qDetail .os-t b { font-size: 12.5px; font-weight: 700; color: var(--ink); }
#qDetail .os-sep { margin: 0 5px; }
#qDetail .os-s { font-size: 11px; gap: 5px; }
#qDetail .os-s > span { font-size: 10.5px; }
#qDetail .os-age { font-size: 11px; }
#qDetail .os-a .cal-btn { font-size: 11.5px; font-weight: 650; padding: 4px 11px; min-height: 0; border-radius: 8px; }
#qDetail .osq-bar { padding: 8px 14px; font-size: 12px; }
#qDetail .osq-bar .cal-btn { font-size: 12px; padding: 5px 12px; min-height: 0; }
#qDetail .aw-foot { font-size: 11.5px; padding: 0 16px 10px; }
.aw-star { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #9a5b00; background: #fff4e0; border-radius: 999px; padding: 2px 8px; margin-left: 8px; vertical-align: 2px; }
.aw-which { display: block; font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--ink-3); margin-top: 2px; }

/* ── Care gaps: tighter rows so a measure list fits on a screen ── */
.aw .aw-kind { padding: 10px 16px; gap: 10px; }
.aw .aw-kind .aw-m h3 { font-size: 14px; font-weight: 650; }
.aw .aw-kind .aw-m small { font-size: 12px; }
.aw .aw-kind .aw-s { font-size: 12px; margin-top: 1px; }
.aw .aw-kind .aw-which { font-size: 11px; margin-top: 0; }
.aw .aw-kind .aw-bar { height: 3px; margin-top: 6px; max-width: 260px; }
.aw .aw-kind .aw-ic { width: 22px; height: 22px; font-size: 12px; }
.aw .aw-kind .aw-n { font-size: 18px; }
.aw .aw-kind .aw-n small { font-size: 10px; }
.aw-list .nd { padding: 9px 16px; gap: 10px; }
.aw-list .nd-t { font-size: 13px; line-height: 1.35; }
.aw-list .nd-s { font-size: 11.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-list .nd-path { margin-top: 3px; }
.aw-list .nd-path span { font-size: 10px; padding: 1px 7px; }
.aw-list .nd-a .cal-btn { font-size: 11.5px; padding: 4px 11px; min-height: 0; }

/* ── Care gaps as rings: the whole year on one screen ── */
.gr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; padding: 4px 0 8px; }
.gr-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; font: inherit; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px 12px; cursor: pointer; transition: all .12s; box-shadow: 0 1px 2px rgba(24,36,96,.04); }
.gr-tile:hover { border-color: #b9c3d9; transform: translateY(-1px); box-shadow: 0 10px 22px -14px rgba(24,36,96,.45); }
.gr-ring { position: relative; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#7FBF9A calc(var(--p) * 1%), #eef0f4 0); flex: none; }
.gr-ring::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.gr-ring b { position: relative; z-index: 1; font-size: 19px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.gr-tile.need .gr-ring { background: conic-gradient(#D97757 calc(var(--p) * 1%), #f6e7e1 0); }
.gr-tile.need .gr-ring b { color: #A64B2A; }
.gr-n { font-size: 12.5px; font-weight: 650; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gr-star { font-style: normal; color: #d4a017; margin-left: 3px; }
.gr-s { font-size: 11px; color: var(--ink-3); line-height: 1.3; }
@media (max-width: 700px) { .gr-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
/* the ring is the measure's score: it fills as patients are closed, like a fitness ring */
/* Two arcs on one ring: solid to --p is billed and closed, pale on to --pw is care that happened
   but is still waiting for the code to go out on a bill. The rest is genuinely still to do. */
.gr-ring { background: conic-gradient(var(--ring, #7FBF9A) calc(var(--p) * 1%), color-mix(in srgb, var(--ring, #7FBF9A) 28%, #eceef3) 0 calc(var(--pw, var(--p)) * 1%), #eceef3 0); }
.gr-tile.low { --ring: #D97757; } .gr-tile.mid { --ring: #E0A100; } .gr-tile.good { --ring: #4FA97B; }
.gr-tile.need .gr-ring, .gr-tile.low .gr-ring { background: conic-gradient(var(--ring) calc(var(--p) * 1%), color-mix(in srgb, var(--ring) 28%, #f3ece9) 0 calc(var(--pw, var(--p)) * 1%), #f3ece9 0); }
.gr-s em { font-style: normal; color: var(--ink-2, #55606f); }
.gr-ring b { font-size: 17px; color: var(--ink); }
.gr-ring b i { font-style: normal; font-size: 10px; font-weight: 700; color: var(--ink-3); margin-left: 1px; }
.gr-tile.need .gr-ring b { color: var(--ink); }
.gr-s b { color: var(--ink); font-weight: 700; }

/* Record-result: the one code that goes on our claim, stated once above the result list */
.gr-code { display:flex; align-items:baseline; gap:10px; margin:10px 0 2px; padding:9px 12px; border-radius:9px;
  background:var(--surface-2, #f4f6f9); border:1px solid var(--line, #e3e7ee); }
.gr-code b { font:600 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing:.02em; color:var(--accent, #2f6fed); }
.gr-code span { font-size:12px; color:var(--muted, #6b7280); }

/* Procedures performed today — its own section in the note, never buried in the exam */
.np-procsec .np-proc { padding: 8px 0; border-bottom: 1px dotted rgba(24,36,96,.14); }
.np-procsec .np-proc:last-child { border-bottom: 0; }
.np-proc-h { display: flex; align-items: baseline; gap: 9px; }
.np-proc-h b { font-size: 13px; font-weight: 700; color: var(--ink); }
.np-proc-codes { font: 600 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; color: #2e7d52; background: #e4f1e9; padding: 3px 6px; border-radius: 5px; }
.np-proc-t { font-size: 12.5px; line-height: 1.55; color: var(--ink); margin-top: 3px; }
.np-proc-sig { font-size: 11px; font-style: italic; color: var(--ink-3); margin-top: 4px; }


/* ── Rooming vitals: each vital is its own field, typed straight into ────────────────────────────
   Fixed widths and flex:none so nothing is ever squeezed to nothing; the row wraps instead. */
.np-vfield { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 5px 10px; background: #fff;
  border: 1px solid rgba(24,36,96,.13); border-radius: 10px; transition: border-color .12s, box-shadow .12s; }
.np-vfield:focus-within { border-color: var(--navy, #1E2E60); box-shadow: 0 0 0 3px rgba(30,46,96,.07); }
.np-vfield > b { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8b93a6; }
.np-vfield input { flex: none; width: 42px; min-width: 42px; font: inherit; font-size: 14px; font-weight: 650; letter-spacing: -.01em;
  color: var(--ink); border: 0; background: transparent; outline: none; text-align: center; padding: 0; font-variant-numeric: tabular-nums; }
.np-vfield input::placeholder { font-size: 12.5px; font-weight: 400; color: #cdd4e0; }
.np-vfield input::-webkit-outer-spin-button, .np-vfield input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.np-vfield .np-vsl { flex: none; font-style: normal; font-size: 13px; color: #cdd4e0; margin: 0 -2px; }
.np-vfield.bp input { width: 40px; min-width: 40px; }
.np-vfield .np-vfield-tag { width: 72px; min-width: 72px; font-size: 11.5px; font-weight: 500; text-align: left; color: #6b7288; border-left: 1px solid rgba(24,36,96,.10); padding-left: 8px; margin-left: 2px; }
.np-vfield-add { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 1px dashed rgba(24,36,96,.20); background: #fff;
  color: #6b7288; font-size: 13px; line-height: 1; cursor: pointer; display: inline-grid; place-items: center; transition: all .12s; }
.np-vfield-add:hover { border-color: var(--navy, #1E2E60); color: var(--navy, #1E2E60); border-style: solid; }
.np-vsetnote { flex: none; font: inherit; font-size: 12.5px; padding: 6px 11px; width: 230px; color: var(--ink);
  border: 1px solid rgba(24,36,96,.13); border-radius: 10px; outline: none; background: #fff; }
.np-vsetnote::placeholder { color: #cdd4e0; }
.np-vsetnote:focus { border-color: var(--navy, #1E2E60); box-shadow: 0 0 0 3px rgba(30,46,96,.07); }
.np-vsave { flex: none; margin-left: 2px; }
.np-line .np-vc.stale { flex: none; }

/* Attesting a nurse visit — the physician's own words, never pre-signed */
.pdg-attest .pdg-main b { font-weight: 650; }
.at-meta { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.at-text { white-space: pre-wrap; font: inherit; font-size: 12.5px; line-height: 1.55; color: var(--ink);
  background: #f7f9fc; border: 1px solid rgba(24,36,96,.10); border-radius: 10px; padding: 11px 13px; max-height: 220px; overflow: auto; margin: 0 0 10px; }
.at-codes { font-size: 12px; color: var(--ink-2, #55606f); margin-bottom: 10px; }
.at-codes span { font: 600 11.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #2e7d52; background: #e4f1e9; padding: 2px 6px; border-radius: 5px; }
.at-note { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; }
.np-apc-tool.warn { color: #a06a10; border-color: #ecdcc4; background: #fdf8ef; }
.np-apc-tool.warn:hover { background: #f9efdd; }

/* Nurse visits waiting on a physician's attestation — on the home page, because nothing bills until then */
.wp-attestbrief { background: #fdf8ef; border: 1px solid #ecdcc4; color: #7a5a12; }
.wp-attestbrief a { color: #a06a10; font-weight: 650; text-decoration: none; border-bottom: 1px dotted #d9bd84; }
.wp-attestbrief a:hover { color: #7a5a12; border-bottom-style: solid; }
.wp-attest-note { margin-left: 10px; font-size: 11px; color: #a09274; }

/* ── Blocked time: a meeting, a holiday, someone's day off. Hatched so it never reads as a
   visit, quiet enough that the day's visits still come first, and clickable to change. ── */
.cal-off { position: absolute; left: 2px; right: 2px; z-index: 2; border-radius: 8px; cursor: pointer;
  background: repeating-linear-gradient(135deg, rgba(90,100,125,.14) 0 6px, rgba(90,100,125,.05) 6px 12px);
  border: 1px dashed rgba(70,82,110,.34); display: flex; align-items: flex-start; overflow: hidden;
  transition: background-color .12s ease, border-color .12s ease; }
.cal-off:hover { border-color: rgba(70,82,110,.6); background: repeating-linear-gradient(135deg, rgba(90,100,125,.2) 0 6px, rgba(90,100,125,.08) 6px 12px); }
.cal-off span { font-size: 10.5px; font-weight: 700; letter-spacing: .01em; color: #4c5670; padding: 3px 7px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.cal-mday-h em.mday-off { color: #4c5670; font-style: normal; font-weight: 700; background: rgba(90,100,125,.12); border-radius: 4px; padding: 0 4px; }
.off-list { display: flex; flex-direction: column; gap: 4px; max-height: 168px; overflow-y: auto; }
.off-row { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 5px 8px; border: 1px solid rgba(24,36,96,.1); border-radius: 8px; background: #fff; cursor: pointer; }
.off-row:hover { border-color: rgba(24,36,96,.28); background: #f7f9fc; }
.off-row.on { border-color: var(--cyan); background: rgba(48,120,192,.08); }
.off-row b { font-size: 12px; color: var(--ink); } .off-row span { font-size: 10.5px; color: var(--ink-3); }
.off-to { align-self: center; font-size: 11px; color: var(--ink-3); }

/* The window that opens when you click the calendar answers one question first — is this
   hour for a patient or not — so the two live as one toggle where the title used to be. */
.mv-mode { display: inline-flex; gap: 2px; padding: 2px; background: rgba(24,36,96,.06); border-radius: 9px; }
.mv-mode button { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 650; letter-spacing: -.01em; color: var(--ink-3); padding: 5px 12px; border-radius: 7px; cursor: pointer; transition: background-color .12s ease, color .12s ease; }
.mv-mode button:hover { color: var(--ink); }
.mv-mode button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(24,36,96,.12); }

/* ── Specialist consults ── */
.cs-card { max-width: 980px; width: min(980px, 96vw); }
.cs-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.cs-body { padding: 14px 18px 18px; }
.cs-grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; }
@media (max-width: 760px) { .cs-grid { grid-template-columns: 1fr; } }
.cs-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 8px 0 6px; }
.cs-specs { display: flex; flex-wrap: wrap; gap: 5px; }
.cs-spec { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid rgba(24,36,96,.12); border-radius: 999px; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.cs-spec i, .cs-spec svg { width: 13px; height: 13px; }
.cs-spec.fit { border-color: rgba(48,120,192,.45); }
.cs-spec.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.cs-spec em { font-style: normal; font-size: 10px; opacity: .8; } .cs-spec em.unex { color: #b45309; } .cs-spec em.part { color: #2563eb; }
.cs-modes { display: flex; flex-direction: column; gap: 5px; }
.cs-mode { text-align: left; padding: 7px 10px; border: 1px solid rgba(24,36,96,.12); border-radius: 9px; background: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.cs-mode b { font-size: 12.5px; } .cs-mode span { font-size: 11px; color: var(--ink-3); }
.cs-mode.on { border-color: var(--navy); background: rgba(24,36,96,.05); }
.cs-q { width: 100%; font: inherit; font-size: 13.5px; padding: 10px 12px; border: 1px solid rgba(24,36,96,.16); border-radius: 10px; resize: vertical; }
.cs-hints { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 10px; }
.cs-hint { font: inherit; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px dashed rgba(24,36,96,.25); background: transparent; cursor: pointer; color: var(--ink-2); }
.cs-preview summary { font-size: 12px; color: var(--ink-3); cursor: pointer; }
.cs-preview pre { white-space: pre-wrap; font-size: 11px; line-height: 1.4; max-height: 220px; overflow: auto; background: #f7f8fb; border-radius: 8px; padding: 8px 10px; margin: 6px 0 0; }
.cs-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.cs-history { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.cs-hrow { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 7px 10px; border: 1px solid rgba(24,36,96,.1); border-radius: 9px; background: #fff; font: inherit; cursor: pointer; }
.cs-hrow span { font-size: 12px; color: var(--ink-2); } .cs-hrow small { font-size: 10.5px; color: var(--ink-3); }
.cs-wait { display: flex; gap: 14px; align-items: flex-start; padding: 30px 10px; }
.cs-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(24,36,96,.15); border-top-color: var(--navy); animation: csSpin .9s linear infinite; flex-shrink: 0; margin-top: 2px; }
@keyframes csSpin { to { transform: rotate(360deg); } }
.cs-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.cs-topbtns { display: flex; gap: 6px; flex-shrink: 0; }
.cs-summary { font-size: 14px; line-height: 1.45; padding: 10px 12px; background: rgba(24,36,96,.05); border-left: 3px solid var(--navy); border-radius: 0 10px 10px 0; margin-bottom: 10px; }
.cs-sec { margin: 10px 0; } .cs-sec h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 0 0 5px; } .cs-sec h4 small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.cs-sec p, .cs-sec li { font-size: 13px; line-height: 1.45; } .cs-sec ul { margin: 0; padding-left: 18px; }
.cs-sec.warn { background: #fff7ed; border-radius: 10px; padding: 8px 12px; }
.cs-rec { border: 1px solid rgba(24,36,96,.12); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; background: #fff; }
.cs-rec.accept { border-color: #16a34a; background: #f0fdf4; } .cs-rec.edit { border-color: #2563eb; background: #eff6ff; } .cs-rec.decline { opacity: .55; }
.cs-rec-h { display: flex; gap: 6px; font-size: 10.5px; margin-bottom: 3px; }
.cs-kind { font-weight: 700; color: var(--navy); background: rgba(24,36,96,.08); padding: 1px 6px; border-radius: 4px; } .cs-urg, .cs-str { color: var(--ink-3); }
.cs-rec-t { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.cs-rec-why { font-size: 12px; color: var(--ink-2); margin-top: 3px; line-height: 1.4; } .cs-checks { color: var(--ink-3); }
.cs-rec-ev { font-size: 11px; color: var(--ink-3); margin-top: 3px; } .cs-rec-ev abbr { text-decoration: underline dotted; cursor: help; }
.cs-rec-a { display: flex; gap: 5px; margin-top: 6px; align-items: center; }
.cs-rec-a button { font: inherit; font-size: 11.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(24,36,96,.18); background: #fff; cursor: pointer; }
.cs-rec-a button[data-do="accept"]:hover { background: #16a34a; color: #fff; border-color: #16a34a; }
.cs-rec-a button[data-do="decline"]:hover { background: #b42318; color: #fff; border-color: #b42318; }
.cs-dec { font-size: 11px; color: var(--ink-3); margin-right: 4px; }
.cs-review { margin-top: 10px; font-size: 12px; } .cs-review summary { cursor: pointer; color: var(--ink-3); } .cs-review > div { margin: 6px 0; line-height: 1.45; }
.cs-flag { color: #b42318; font-weight: 600; }
.cs-loading, .cs-body .empty { color: var(--ink-3); font-size: 13px; padding: 12px 0; }

.cs-prem { display: flex; gap: 6px; align-items: center; font-size: 12px; margin-top: 8px; color: var(--ink-2); } .cs-prem span { color: var(--ink-3); }
.cs-spend { font-size: 11px; color: var(--ink-3); margin-top: 4px; }

/* ── EKG ── */
.ek-card { max-width: 1120px; width: min(1120px, 97vw); }
.ek-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.ek-body { padding: 12px 16px 16px; display: block; overflow-y: auto; }
.ek-upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.ek-drop { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1.5px dashed rgba(24,36,96,.3); border-radius: 10px; cursor: pointer; background: #fff; min-width: 260px; }
.ek-drop b { font-size: 13px; } .ek-drop span { font-size: 11px; color: var(--ink-3); } .ek-drop.small { min-width: 0; padding: 8px 10px; }
.ek-acq { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-3); }
.ek-status { width: 100%; font-size: 11px; color: var(--ink-3); }
.ek-list { display: flex; flex-direction: column; gap: 4px; }
.ek-row { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 7px 10px; border: 1px solid rgba(24,36,96,.1); border-left-width: 4px; border-radius: 9px; background: #fff; font: inherit; cursor: pointer; }
.ek-row span { font-size: 12.5px; } .ek-row small { font-size: 10.5px; color: var(--ink-3); }
.ek-row.ek-crit { border-left-color: #b42318; } .ek-row.ek-abn { border-left-color: #d97706; } .ek-row.ek-ok { border-left-color: #16a34a; } .ek-row.ek-bord { border-left-color: #eab308; }
.ek-top { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.ek-meas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ek-meas div { display: flex; flex-direction: column; padding: 5px 10px; border-radius: 8px; background: rgba(24,36,96,.05); min-width: 84px; }
.ek-meas span { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); } .ek-meas b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ek-canvas { width: 100%; border: 1px solid rgba(24,36,96,.12); border-radius: 8px; display: block; }
.ek-read { margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(24,36,96,.12); background: #fff; }
.ek-read.ek-crit { border-color: #b42318; background: #fff5f4; } .ek-read.ek-abn { border-color: #d97706; background: #fffaf0; } .ek-read.ek-ok { border-color: #16a34a; background: #f0fdf4; }
.ek-read-h { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; } .ek-signed { font-size: 11px; color: var(--ink-3); }
.ek-rhythm { font-size: 13px; margin: 4px 0; }
.ek-findings { margin: 4px 0; padding-left: 18px; font-size: 12.5px; line-height: 1.45; } .ek-findings li small { color: var(--ink-3); margin-left: 6px; font-size: 10px; }
.ek-findings li.ek-crit b { color: #b42318; } .ek-findings li.ek-abn b { color: #b45309; }
.ek-action { color: #b42318; font-weight: 600; }
.ek-second { font-size: 12.5px; margin: 4px 0 2px; padding: 6px 8px; border-left: 3px solid var(--ink-3, #9aa4b2); background: var(--surface-2, rgba(0,0,0,.03)); border-radius: 4px; }
.ek-second.warn { border-left-color: #d98324; }
.ek-second small { color: var(--ink-2); margin-left: 4px; }
.ek-prior { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.ek-mach { font-size: 12px; margin-top: 6px; } .ek-mach summary { cursor: pointer; color: var(--ink-3); } .ek-prob { display: inline-block; padding: 1px 6px; border-radius: 4px; background: rgba(24,36,96,.06); margin: 2px 2px 0 0; font-size: 11px; }
.ek-sign textarea { width: 100%; font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid rgba(24,36,96,.16); border-radius: 8px; margin-top: 8px; }
.ek-sign-b { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.ek-final { margin-top: 8px; font-size: 13px; }
.ek-loading, .ek-body .empty { color: var(--ink-3); font-size: 13px; padding: 12px 0; }

/* consult: reason for consult + note to PCP */
.cs-brief{width:100%;box-sizing:border-box;font:inherit;font-size:13px;line-height:1.45;padding:8px 10px;border:1px solid var(--line,#d9dde5);border-radius:8px;background:var(--surface-2,#fafbfd);resize:vertical;margin-bottom:8px}
.cs-write{font:inherit;font-size:12px;padding:2px 8px;margin-left:8px;border:1px solid var(--line,#d9dde5);border-radius:999px;background:#fff;cursor:pointer}
.cs-write:disabled{opacity:.6;cursor:wait}
.cs-writesrc{font-size:11.5px;color:var(--ink-3,#6b7280);margin-left:4px}
.cs-note{margin:6px 0 10px;padding:8px 10px;border-left:3px solid var(--brand,#3078C0);background:var(--surface-2,#f4f7fb);border-radius:6px;font-size:13px}
.cs-brief-v summary{cursor:pointer;font-size:12.5px;color:var(--ink-3,#6b7280)}
.cs-brief-v p{font-size:13px;margin:4px 0 8px}

/* EKG and Imaging windows: cap to the viewport and scroll the body — a long read or a study list must never be clipped */
.modal-overlay > .modal-card.ek-card, .modal-overlay > .modal-card.im-card { display: flex; flex-direction: column; max-height: 92vh; }
.modal-card.ek-card > .modal-head, .modal-card.im-card > .modal-head { flex-shrink: 0; }
.modal-card.ek-card > .ek-body, .modal-card.im-card > .im-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-card.im-card { max-width: 1120px; width: min(1120px, 97vw); }

.im-plaque-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.im-plaque-opt input { accent-color: var(--navy, #16213e); }

/* ===== Processing tray — long-running work, visible from anywhere in the EMR =====
   The pill is deliberately quiet: it only exists while there is something to say, it borrows the
   brand cyan while work is running and drops to a plain grey tick once everything has landed. */
.jobswrap { position: relative; flex-shrink: 0; }
.jobs-pill {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 10px;
  border: 1px solid rgba(48, 120, 192, .30); border-radius: var(--r-pill);
  background: rgba(48, 120, 192, .10); color: var(--cyan-text);
  font-size: var(--text-sm); font-weight: 650; letter-spacing: .01em; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.jobs-pill:hover { background: rgba(48, 120, 192, .18); box-shadow: var(--shadow); transform: translateY(-1px); }
.jobs-pill:active { transform: translateY(0); }
.jobswrap.idle .jobs-pill { border-color: var(--line); background: rgba(24, 36, 96, .05); color: var(--ink-2); }
.jobs-n {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--cyan-deep); color: #fff; font-size: var(--text-xs); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.jobs-n.done { background: var(--ink-3); }
.jobs-spin {
  width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(48, 120, 192, .28); border-top-color: var(--cyan-deep);
  animation: jobsSpin .85s linear infinite;
}
.jobs-spin.sm { width: 11px; height: 11px; border-width: 2px; }
.jobswrap.idle .jobs-spin { border-color: var(--line); border-top-color: var(--ink-3); animation: none; }
@keyframes jobsSpin { to { transform: rotate(360deg); } }

.jobs-pop { min-width: 348px; max-width: 380px; padding: 6px 6px 0; }
.jb-list { max-height: 60vh; overflow-y: auto; }
.jb-row { display: grid; grid-template-columns: 20px 1fr auto; align-items: start; gap: 10px; padding: 10px 9px; border-radius: var(--r-md); }
.jb-row + .jb-row { border-top: 1px solid var(--line-2); }
.jb-row:hover { background: rgba(48, 120, 192, .07); }
.jb-dot { display: flex; align-items: center; justify-content: center; height: 18px; font-size: var(--text-sm); font-weight: 800; color: var(--ok-text); }
.jb-row.bad .jb-dot { color: var(--danger-text); }
.jb-who { font-size: var(--text-base); font-weight: 700; color: var(--ink); }
.jb-st { font-size: var(--text-xs); color: var(--ink-2); margin-top: 1px; }
.jb-meta { font-size: var(--text-xs); color: var(--ink-3); margin-top: 3px; }
.jb-meta.bad { color: var(--danger-text); }
.jb-bar { height: 4px; margin: 6px 0 1px; border-radius: var(--r-pill); background: rgba(24, 36, 96, .10); overflow: hidden; }
.jb-bar > span {
  display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--brand-grad);
  transform-origin: left center; transform: scaleX(var(--p, 0)); transition: transform 600ms var(--ease);
}
/* No percentage yet — a shuttle that says "working", not a number it does not have */
.jb-bar.indet > span { transform: scaleX(.35); animation: jobsShuttle 1.5s var(--ease) infinite; transition: none; }
@keyframes jobsShuttle { 0% { transform: translateX(-40%) scaleX(.35); } 100% { transform: translateX(300%) scaleX(.35); } }
.jb-open { align-self: center; }
.jb-foot { font-size: var(--text-micro); color: var(--ink-3); padding: 8px 10px 9px; border-top: 1px solid var(--line-2); margin-top: 4px; }

@media (max-width: 1180px) { .jobs-lbl { display: none; } .jobs-pill { padding: 0 6px 0 8px; gap: 6px; } }
@media (max-width: 640px) { .jobs-pop { min-width: 0; width: min(340px, calc(100vw - 24px)); position: fixed; top: 56px; right: 10px; } }
@media (prefers-reduced-motion: reduce) {
  .jobs-spin { animation: none; }
  .jb-bar.indet > span { animation: none; transform: scaleX(1); opacity: .55; }
  .jb-bar > span { transition: none; }
}

/* every popup window: never taller than the screen, body scrolls — a long consult, read or list must always be reachable.
   Cards that manage their own height/flex layout (rxp, fx) keep their rules. */
.modal-overlay > .modal-card:not(.fx-card):not(.rxp-card) { display: flex; flex-direction: column; max-height: 92vh; }
.modal-overlay > .modal-card:not(.fx-card):not(.rxp-card) > .modal-head { flex-shrink: 0; }
.modal-overlay > .modal-card:not(.fx-card):not(.rxp-card) > .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-overlay > .modal-card:not(.fx-card):not(.rxp-card) > .modal-foot { flex-shrink: 0; }

/* Specialist consults card on the chart */
.cs-chart-row { display: grid; grid-template-columns: 120px 1fr; gap: 2px 10px; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line, #e8ebf2); background: transparent; cursor: pointer; font: inherit; color: inherit; }
.cs-chart-row:hover { background: var(--glass, rgba(22,33,62,.04)); }
.cs-chart-spec { font-weight: 600; color: var(--navy, #16213e); }
.cs-chart-q { color: var(--ink-2, #3b4256); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-chart-meta { grid-column: 2; color: var(--ink-3, #6b7280); font-size: 11.5px; }


/* ── Coverage card: the payer directory match, and what the plan answers ── */
.ins-carrier-meta { font-size: 11.5px; color: var(--ink-2); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ins-tx {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .02em;
  padding: 1px 5px; border-radius: 999px; background: var(--ok-bg, #e8f5ee); color: var(--ok-fg, #1d6b43);
  border: 1px solid color-mix(in oklab, var(--ok-fg, #1d6b43) 22%, transparent);
}
.ins-tx.none { background: transparent; border: 0; color: var(--ink-3, #8a8f98); font-weight: 500; letter-spacing: 0; }
.ins-opt-sub .ins-tx { margin-right: 2px; }
.cov-tx { margin-left: auto; display: flex; gap: 3px; }
.ins-problems {
  margin: 6px 0 2px; padding: 7px 10px; border-radius: 8px;
  background: var(--warn-bg, #fdf4e3); border: 1px solid color-mix(in oklab, var(--warn-fg, #8a5a00) 20%, transparent);
}
.ins-problem { font-size: 12px; line-height: 1.45; color: var(--warn-fg, #8a5a00); }
.ins-problem + .ins-problem { margin-top: 2px; }

/* ===== Logged-out state: sign-in card only — no chrome, no data hints =====
   body.is-login is set by showLogin()/showChangePassword() in emr.js and
   cleared once /auth/me succeeds. Unconditional (not media-gated) so it
   applies on phone AND desktop alike. */
body.is-login .topbar,
body.is-login .charttabs,
body.is-login .mnav,
body.is-login .jobswrap,
body.is-login .notifwrap,
body.is-login .wp-session,
body.is-login .wp-ph-fab {
  display: none !important;
}
body.is-login .main { padding-top: 0; }
