/* ==========================================================================
   EMR UI — design tokens + components for the redesigned screens.
   New screens load this file; the legacy theme (style.css) is untouched.

   Palette: deep teal ink on cool clinical grey.
   Type:    Public Sans (body), Bricolage Grotesque (display, sparingly),
            IBM Plex Mono (codes, times, identifiers).
   ========================================================================== */

:root {
  --emr-canvas: #faf8f3;
  --emr-surface: #ffffff;
  --emr-surface-2: #f6f9f8;
  --emr-ink: #0f2a1e;
  --emr-ink-2: #6b6458;
  --emr-line: #e4dccb;
  --emr-primary: #1f4d3a;
  --emr-primary-hover: #095a56;
  --emr-primary-ink: #ffffff;
  --emr-primary-soft: #e6eee4;
  --emr-panel: #0f2a1e;
  --emr-panel-ink: #e3ecea;
  --emr-panel-muted: #9fb6b3;
  --emr-panel-accent: #ecd186;

  --emr-danger: #b42318;
  --emr-danger-soft: #fdecea;
  --emr-warning: #8a4b00;
  --emr-warning-soft: #fdf1dc;
  --emr-info: #1d4f91;
  --emr-info-soft: #e5eefb;
  --emr-success: #0b6e3a;
  --emr-success-soft: #e0f2e8;

  --emr-font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --emr-font-display: "Bricolage Grotesque", "Public Sans", system-ui, sans-serif;
  --emr-font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --emr-radius-sm: 6px;
  --emr-radius: 10px;
  --emr-radius-lg: 16px;
  --emr-focus: 0 0 0 3px color-mix(in srgb, var(--emr-primary) 35%, transparent);
  --emr-shadow: 0 1px 2px rgb(15 42 30 / 6%), 0 8px 24px rgb(15 42 30 / 6%);
  --emr-data: #0a8f84;          /* single-hue data marks (validated vs light surface) */
  --emr-data-track: #e7eeed;
}

/* Dark theme is opt-in (html[data-theme="dark"]) so a page is never half legacy-light,
   half dark. Sign-in pages opt in automatically when the OS prefers dark. */
:root[data-theme="dark"] {
    --emr-canvas: #0b1417;
    --emr-surface: #111d21;
    --emr-surface-2: #16252a;
    --emr-ink: #e3ecea;
    --emr-ink-2: #9fb2b0;
    --emr-line: #24363b;
    --emr-primary: #3cc4b4;
    --emr-primary-hover: #5fd3c5;
    --emr-primary-ink: #06201d;
    --emr-primary-soft: #133a37;
    --emr-panel: #07191d;
    --emr-danger: #ff8a80;
    --emr-danger-soft: #3a1714;
    --emr-warning: #f2b766;
    --emr-warning-soft: #3a2a12;
    --emr-info: #8fb1ff;
    --emr-info-soft: #16233f;
    --emr-success: #6fd69c;
    --emr-success-soft: #133222;
    --emr-shadow: none;
    --emr-data: #2aa596;        /* validated vs dark surface */
    --emr-data-track: #1b2a2f;
  }

/* --- Auth layout -------------------------------------------------------- */

.emr-auth {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 5fr) 7fr;
  background: var(--emr-canvas);
  color: var(--emr-ink);
  font: 400 15px/1.55 var(--emr-font);
  -webkit-font-smoothing: antialiased;
}
.emr-auth *, .emr-auth *::before, .emr-auth *::after { box-sizing: border-box; }

.emr-auth__panel {
  background: var(--emr-panel);
  color: var(--emr-panel-ink);
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
}
.emr-auth__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.emr-auth__brand img { height: 36px; width: auto; display: block; }
.emr-auth__wordmark { font: 600 20px/1 var(--emr-font-display); letter-spacing: -.01em; color: var(--emr-panel-ink); }
.emr-auth__clinics { flex-basis: 100%; }
.emr-auth__clinics {
  margin: 4px 0 0;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--emr-panel-muted);
}
.emr-auth__privacy {
  font-size: 13px;
  color: var(--emr-panel-muted);
  max-width: 34ch;
  margin: 0;
}

/* Signature: the sign-in sequence rail. Each step is a real stage of signing in. */
.emr-steps { list-style: none; margin: 0; padding: 0; }
.emr-steps__item {
  position: relative;
  padding: 0 0 28px 36px;
  color: var(--emr-panel-muted);
}
.emr-steps__item:last-child { padding-bottom: 0; }
.emr-steps__item::before {
  content: "";
  position: absolute; left: 7px; top: 22px; bottom: -2px;
  width: 2px; background: currentColor; opacity: .35;
}
.emr-steps__item:last-child::before { display: none; }
.emr-steps__dot {
  position: absolute; left: 0; top: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor;
}
.emr-steps__name {
  display: block;
  font: 600 22px/1.25 var(--emr-font-display);
  letter-spacing: -.01em;
}
.emr-steps__hint { display: block; font-size: 13px; margin-top: 2px; }
.emr-steps__item.is-done { color: var(--emr-panel-accent); }
.emr-steps__item.is-done .emr-steps__dot { background: currentColor; }
.emr-steps__item.is-current { color: var(--emr-panel-ink); }
.emr-steps__item.is-current .emr-steps__dot {
  border-color: var(--emr-panel-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--emr-panel-accent) 25%, transparent);
}
.emr-steps__item.is-current .emr-steps__name { font-size: 30px; }

.emr-auth__main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.emr-auth__card {
  width: 100%;
  max-width: 400px;
}
.emr-auth__eyebrow {
  font: 500 12px/1 var(--emr-font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--emr-primary);
  margin: 0 0 12px;
}
.emr-auth__title {
  font: 600 32px/1.15 var(--emr-font-display);
  letter-spacing: -.02em;
  margin: 0 0 8px;
}
.emr-auth__lead { color: var(--emr-ink-2); margin: 0 0 28px; }
.emr-auth__foot {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--emr-line);
  font-size: 13px;
  color: var(--emr-ink-2);
}
.emr-auth__foot a { color: var(--emr-primary); }

@media (max-width: 860px) {
  .emr-auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .emr-auth__panel { padding: 20px 16px; gap: 0; flex-direction: row; align-items: center; }
  .emr-auth__panel .emr-steps, .emr-auth__privacy, .emr-auth__clinics { display: none; }
  .emr-auth__brand img { height: 28px; }
  .emr-auth__wordmark { font-size: 17px; }
  .emr-auth__main { align-items: flex-start; padding: 32px 16px 48px; }
  .emr-auth__title { font-size: 28px; }
}

/* --- Form controls ------------------------------------------------------ */

.emr-field { margin: 0 0 18px; }
.emr-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 600; font-size: 14px; margin: 0 0 6px;
}
.emr-input {
  width: 100%;
  font: inherit;
  color: var(--emr-ink);
  background: var(--emr-surface);
  border: 1px solid var(--emr-line);
  border-radius: var(--emr-radius);
  padding: 11px 14px;
  min-height: 46px;
  transition: border-color .15s;
}
.emr-input:hover { border-color: color-mix(in srgb, var(--emr-ink) 30%, var(--emr-line)); }
.emr-input:focus { outline: none; border-color: var(--emr-primary); box-shadow: var(--emr-focus); }
.emr-input[aria-invalid="true"] { border-color: var(--emr-danger); }

.emr-input-group { position: relative; }
.emr-input-group .emr-input { padding-right: 76px; }
.emr-reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font: 600 13px/1 var(--emr-font);
  color: var(--emr-primary);
  background: none; border: 0; border-radius: var(--emr-radius-sm);
  padding: 8px 10px; cursor: pointer;
}
.emr-reveal:focus-visible { outline: none; box-shadow: var(--emr-focus); }
.emr-hint { font-size: 13px; color: var(--emr-ink-2); margin: 6px 0 0; }
.emr-hint--warn { color: var(--emr-warning); font-weight: 600; }

/* One-time code: one real input, drawn as six cells. */
.emr-code {
  width: 100%;
  font: 500 28px/1 var(--emr-font-mono);
  letter-spacing: .5em;
  text-indent: .5em;
  text-align: center;
  color: var(--emr-ink);
  background: var(--emr-surface);
  border: 1px solid var(--emr-line);
  border-radius: var(--emr-radius);
  padding: 14px 0;
}
.emr-code::placeholder { color: var(--emr-line); }
.emr-code:focus { outline: none; border-color: var(--emr-primary); box-shadow: var(--emr-focus); }

/* --- Buttons ------------------------------------------------------------ */

.emr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  min-height: 46px;
  font: 600 15px/1 var(--emr-font);
  border-radius: var(--emr-radius);
  border: 1px solid transparent;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.emr-btn:focus-visible { outline: none; box-shadow: var(--emr-focus); }
.emr-btn--primary { background: var(--emr-primary); color: var(--emr-primary-ink); }
.emr-btn--primary:hover { background: var(--emr-primary-hover); }
.emr-btn--secondary { background: transparent; color: var(--emr-ink); border-color: var(--emr-line); }
.emr-btn--secondary:hover { background: var(--emr-surface-2); }
.emr-btn--danger { background: var(--emr-danger); color: #fff; }
.emr-btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.emr-btn + .emr-btn { margin-top: 10px; }

/* --- Notices ------------------------------------------------------------ */

.emr-notice {
  border-radius: var(--emr-radius);
  padding: 12px 14px;
  margin: 0 0 20px;
  font-size: 14px;
  border-left: 4px solid currentColor;
}
.emr-notice p { margin: 0; color: var(--emr-ink); }
.emr-notice p + p { margin-top: 4px; }
.emr-notice strong { display: block; margin-bottom: 2px; color: var(--emr-ink); }
.emr-notice--error { color: var(--emr-danger); background: var(--emr-danger-soft); }
.emr-notice--warning { color: var(--emr-warning); background: var(--emr-warning-soft); }
.emr-notice--info { color: var(--emr-info); background: var(--emr-info-soft); }
.emr-notice--success { color: var(--emr-success); background: var(--emr-success-soft); }

/* --- Choice cards (2FA method) ----------------------------------------- */

.emr-choices { border: 0; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.emr-choice {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start;
  padding: 14px 16px;
  background: var(--emr-surface);
  border: 1px solid var(--emr-line);
  border-radius: var(--emr-radius);
  cursor: pointer;
}
.emr-choice:has(input:checked) { border-color: var(--emr-primary); background: var(--emr-primary-soft); }
.emr-choice:has(input:focus-visible) { box-shadow: var(--emr-focus); }
.emr-choice input { margin: 4px 0 0; accent-color: var(--emr-primary); width: 18px; height: 18px; }
.emr-choice__name { font-weight: 600; }
.emr-choice__desc { grid-column: 2; font-size: 13px; color: var(--emr-ink-2); }
.emr-tag {
  display: inline-block; margin-left: 6px;
  font: 500 11px/1 var(--emr-font-mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--emr-primary); background: var(--emr-primary-soft);
  padding: 4px 6px; border-radius: 4px; vertical-align: 2px;
}

/* --- Enrollment -------------------------------------------------------- */

.emr-enroll { list-style: none; margin: 0 0 24px; padding: 0; counter-reset: enroll; }
.emr-enroll li {
  counter-increment: enroll;
  display: grid; grid-template-columns: 28px 1fr; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--emr-line);
}
.emr-enroll li::before {
  content: counter(enroll);
  font: 600 13px/28px var(--emr-font-mono);
  text-align: center; border-radius: 50%;
  background: var(--emr-primary-soft); color: var(--emr-primary);
  width: 28px; height: 28px;
}
.emr-qr {
  display: block; width: 176px; height: 176px; margin: 6px 0 4px;
  background: #fff; padding: 8px; border-radius: var(--emr-radius);
  border: 1px solid var(--emr-line);
}

@media (prefers-reduced-motion: reduce) {
  .emr-auth * { transition: none !important; }
}

/* ==========================================================================
   App shell (redesigned staff pages) — first used by the audit report.
   ========================================================================== */

.emr-app {
  margin: 0;
  min-height: 100vh;
  background: var(--emr-canvas);
  color: var(--emr-ink);
  font: 400 14px/1.5 var(--emr-font);
  -webkit-font-smoothing: antialiased;
}
.emr-app *, .emr-app *::before, .emr-app *::after { box-sizing: border-box; }
/* Low specificity on purpose: any component that colours its own links (dark bands, sidebar, chips) wins. */
:where(.emr-app) a { color: var(--emr-primary); }
.emr-app :focus-visible { outline: none; box-shadow: var(--emr-focus); border-radius: 4px; }

.emr-topbar {
  display: flex; align-items: center; gap: 16px;
  background: var(--emr-panel); color: var(--emr-panel-ink);
  padding: 12px 24px;
}
.emr-topbar img { height: 26px; width: auto; }
.emr-topbar__name { font: 600 16px/1 var(--emr-font-display); }
.emr-topbar__section { color: var(--emr-panel-muted); font-size: 13px; }
.emr-topbar__right { margin-left: auto; display: flex; gap: 16px; font-size: 13px; }
.emr-topbar a { color: var(--emr-panel-ink); }

.emr-page { max-width: 1320px; margin: 0 auto; padding: 28px 24px 64px; }
.emr-page__head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.emr-page__title { font: 600 28px/1.15 var(--emr-font-display); letter-spacing: -.02em; margin: 0; }
.emr-page__sub { color: var(--emr-ink-2); margin: 4px 0 0; }

.emr-btn--inline { width: auto; min-height: 38px; padding: 8px 14px; font-size: 14px; }
.emr-btn + .emr-btn--inline, .emr-btn--inline + .emr-btn { margin-top: 0; }

/* Stat tiles: each one is a link that filters the list. */
.emr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.emr-stat {
  display: block; text-decoration: none; color: var(--emr-ink);
  background: var(--emr-surface); border: 1px solid var(--emr-line); border-radius: var(--emr-radius);
  padding: 14px 16px;
}
.emr-app a.emr-stat { color: var(--emr-ink); }
.emr-stat:hover { border-color: var(--emr-primary); }
.emr-stat__value { display: block; font: 500 26px/1.1 var(--emr-font-mono); }
.emr-stat__label { display: block; font-size: 13px; color: var(--emr-ink-2); margin-top: 2px; }
.emr-stat.is-alert .emr-stat__value { color: var(--emr-danger); }

.emr-filters {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
  align-items: end;
  background: var(--emr-surface); border: 1px solid var(--emr-line); border-radius: var(--emr-radius);
  padding: 16px; margin-bottom: 16px;
}
.emr-filters .emr-field { margin: 0; }
.emr-filters .emr-label { font-size: 12px; }
.emr-filters .emr-input { min-height: 38px; padding: 7px 10px; font-size: 14px; }
.emr-filters__actions { display: flex; gap: 8px; }

.emr-banner {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  background: var(--emr-primary-soft); border-radius: var(--emr-radius);
  padding: 12px 16px; margin-bottom: 16px;
}

.emr-table-wrap { background: var(--emr-surface); border: 1px solid var(--emr-line); border-radius: var(--emr-radius); overflow: hidden; }
.emr-table { width: 100%; border-collapse: collapse; }
.emr-table th {
  text-align: left; font: 600 12px/1.2 var(--emr-font); color: var(--emr-ink-2);
  text-transform: uppercase; letter-spacing: .04em;
  padding: 10px 12px; border-bottom: 1px solid var(--emr-line); background: var(--emr-surface-2);
}
.emr-table td { padding: 10px 12px; border-bottom: 1px solid var(--emr-line); vertical-align: top; }
.emr-table tr:last-child td { border-bottom: 0; }
.emr-table .mono { font-family: var(--emr-font-mono); font-size: 12.5px; }
.emr-muted { color: var(--emr-ink-2); font-size: 12.5px; }
.emr-table details summary { cursor: pointer; color: var(--emr-primary); font-size: 13px; }
.emr-table pre {
  margin: 8px 0 0; padding: 10px; background: var(--emr-surface-2); border-radius: var(--emr-radius-sm);
  font: 12px/1.45 var(--emr-font-mono); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 420px;
}
.emr-empty { padding: 48px 16px; text-align: center; color: var(--emr-ink-2); }

.emr-badge {
  display: inline-block; font: 600 11.5px/1 var(--emr-font); padding: 4px 8px; border-radius: 999px; white-space: nowrap;
}
.emr-badge--success { color: var(--emr-success); background: var(--emr-success-soft); }
.emr-badge--failure { color: var(--emr-danger); background: var(--emr-danger-soft); }
.emr-badge--denied { color: var(--emr-warning); background: var(--emr-warning-soft); }
.emr-badge--info { color: var(--emr-info); background: var(--emr-info-soft); }

.emr-pager { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .emr-topbar { padding: 12px 16px; }
  .emr-topbar__section { display: none; }
  .emr-page { padding: 20px 16px 48px; }
  .emr-table thead { display: none; }
  .emr-table, .emr-table tbody, .emr-table tr, .emr-table td { display: block; width: 100%; }
  .emr-table tr { border-bottom: 1px solid var(--emr-line); padding: 8px 0; }
  .emr-table td { border: 0; padding: 3px 14px; }
  .emr-table td[data-label] { position: relative; padding-left: 110px; min-height: 24px; }
  .emr-table td[data-label]::before {
    content: attr(data-label); position: absolute; left: 14px; top: 5px; width: 90px;
    font: 600 11px/1.4 var(--emr-font); text-transform: uppercase; letter-spacing: .04em; color: var(--emr-ink-2);
  }
}

/* ==========================================================================
   Practice Insights
   ========================================================================== */

.emr-section { margin: 36px 0 0; }
.emr-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; }
.emr-section__title { font: 600 20px/1.2 var(--emr-font-display); letter-spacing: -.01em; margin: 0; }
.emr-section__note { color: var(--emr-ink-2); font-size: 13px; margin: 0; max-width: 70ch; }
.emr-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.emr-card { background: var(--emr-surface); border: 1px solid var(--emr-line); border-radius: var(--emr-radius); padding: 16px; min-width: 0; }
.emr-card__title { font-weight: 600; font-size: 14px; margin: 0 0 10px; }

.emr-signals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.emr-signal { background: var(--emr-surface); border: 1px solid var(--emr-line); border-left: 4px solid var(--emr-data); border-radius: var(--emr-radius); padding: 14px 16px; }
.emr-signal__kind { display: block; font: 500 11px/1 var(--emr-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--emr-primary); margin-bottom: 6px; }
.emr-signal p { margin: 0; font-size: 14.5px; line-height: 1.5; }

/* Horizontal bar rows: label | bar | value */
.emr-bars { list-style: none; margin: 0; padding: 0; }
.emr-bars li { display: grid; grid-template-columns: minmax(96px, 38%) 1fr 64px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13.5px; }
.emr-bars__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emr-bars__value { text-align: right; font-family: var(--emr-font-mono); font-size: 12.5px; color: var(--emr-ink-2); }
.emr-bar { height: 10px; background: var(--emr-data-track); border-radius: 0 4px 4px 0; overflow: hidden; }
.emr-bar > span { display: block; height: 100%; background: var(--emr-data); border-radius: 0 4px 4px 0; min-width: 2px; }
.emr-bars li:hover .emr-bar > span { filter: brightness(1.1); }
.emr-suppressed { color: var(--emr-ink-2); font-style: italic; font-family: var(--emr-font); }

/* Monthly column chart */
.emr-columns { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 18px; border-bottom: 1px solid var(--emr-line); }
.emr-column { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; position: relative; }
.emr-column__bar { width: 100%; max-width: 38px; background: var(--emr-data); border-radius: 4px 4px 0 0; min-height: 2px; }
.emr-column__value { font: 500 11px/1 var(--emr-font-mono); color: var(--emr-ink-2); margin-bottom: 4px; }
.emr-column-labels { display: flex; gap: 6px; margin-top: 6px; }
.emr-column-labels span { flex: 1 1 0; text-align: center; font-size: 11px; color: var(--emr-ink-2); min-width: 0; overflow: hidden; white-space: nowrap; }

.emr-table-scroll { overflow-x: auto; }
.emr-table--segments th, .emr-table--segments td { white-space: nowrap; }
.emr-table--segments td.num, .emr-table--segments th.num { text-align: right; font-family: var(--emr-font-mono); font-size: 12.5px; }
.emr-table--segments .emr-bar { width: 80px; display: inline-block; vertical-align: middle; margin-right: 8px; }

.emr-callout { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; background: var(--emr-warning-soft); border-radius: var(--emr-radius); padding: 14px 16px; }
.emr-callout p { margin: 0; color: var(--emr-ink); }
.emr-footnote { color: var(--emr-ink-2); font-size: 12.5px; margin-top: 32px; line-height: 1.6; max-width: 90ch; }

@media (max-width: 760px) {
  .emr-bars li { grid-template-columns: minmax(80px, 42%) 1fr 56px; }
  .emr-columns { height: 140px; gap: 3px; }
  .emr-column__value { display: none; }
}

/* Redesigned pages inside the legacy .page-wrapper bring their own padding. */
.page-wrapper > .content.emr-app { padding: 0; min-height: calc(100vh - 64px); }

/* ==========================================================================
   Dashboards
   ========================================================================== */

.emr-dash-hero { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.emr-dash-hero__date { font: 500 12px/1 var(--emr-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--emr-ink-2); margin: 0 0 8px; }
.emr-dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.emr-dash-actions .emr-btn { width: auto; min-height: 40px; padding: 9px 14px; font-size: 14px; }
.emr-dash-actions .emr-btn + .emr-btn { margin-top: 0; }
.emr-stat__trend { display: block; font-size: 12.5px; margin-top: 6px; color: var(--emr-ink-2); }
.emr-stat__trend.is-up { color: var(--emr-success); }
.emr-stat__trend.is-down { color: var(--emr-danger); }

.emr-list { list-style: none; margin: 0; padding: 0; }
.emr-list li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--emr-line); }
.emr-list li:first-child { border-top: 0; }
.emr-list__avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  background: var(--emr-primary-soft); color: var(--emr-primary); font: 600 12px/1 var(--emr-font); }
.emr-list__main { min-width: 0; flex: 1 1 auto; }
.emr-list__title { display: block; font-weight: 600; color: var(--emr-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.emr-list__title:hover { color: var(--emr-primary); text-decoration: underline; }
.emr-list__meta { display: block; font-size: 12.5px; color: var(--emr-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emr-list__side { flex: 0 0 auto; font: 500 12px/1 var(--emr-font-mono); color: var(--emr-ink-2); text-align: right; }
.emr-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.emr-card__head a { font-size: 13px; }

/* Buttons that are links keep their own colors inside redesigned pages. */
.emr-app a.emr-btn--primary, .emr-app a.emr-btn--primary:hover { color: var(--emr-primary-ink); text-decoration: none; }
.emr-app a.emr-btn--secondary, .emr-app a.emr-btn--secondary:hover { color: var(--emr-ink); text-decoration: none; }
@media (max-width: 560px) {
  .emr-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .emr-stat { padding: 12px; }
  .emr-stat__value { font-size: 22px; }
}
@media (max-width: 560px) {
  .emr-filters { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
  .emr-filters__actions { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .emr-table--segments td.num { text-align: left; }
  .emr-table--segments td:first-child { font-weight: 600; padding-top: 10px; }
}
@media (max-width: 760px) {
  /* Wide numeric tables stay tables and scroll sideways inside their card. */
  .emr-table.emr-table--keep { display: table; width: auto; min-width: 100%; }
  .emr-table--keep thead { display: table-header-group; }
  .emr-table--keep tbody { display: table-row-group; }
  .emr-table--keep tr { display: table-row; padding: 0; }
  .emr-table--keep td, .emr-table--keep th { display: table-cell; width: auto; padding: 8px 10px; }
  .emr-table--keep td.num { text-align: right; }
  .emr-table--keep td:first-child { font-weight: 400; padding-top: 8px; }
}

/* Practice Insights: AI analysis + provider sparklines */
.emr-ai__summary { font-size: 15.5px; line-height: 1.55; margin: 0 0 14px; }
.emr-ai__list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.emr-ai__item { border: 1px solid var(--emr-line); border-radius: var(--emr-radius); padding: 14px 16px; background: var(--emr-surface-2); }
.emr-ai__item p { margin: 6px 0 0; }
.emr-ai__title { font: 600 16px/1.3 var(--emr-font); margin: 6px 0 0; }
.emr-ai__type { font: 500 10.5px/1 var(--emr-font-mono); letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; color: var(--emr-info); background: var(--emr-info-soft); }
.emr-ai__type--opportunity { color: var(--emr-success); background: var(--emr-success-soft); }
.emr-ai__type--risk { color: var(--emr-danger); background: var(--emr-danger-soft); }
.emr-ai__type--data { color: var(--emr-warning); background: var(--emr-warning-soft); }
.emr-ai__meta { margin: 0 0 12px; }
.emr-spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; width: 96px; vertical-align: middle; }
.emr-spark > span { flex: 1 1 0; background: var(--emr-data); border-radius: 1px 1px 0 0; min-height: 1px; }

/* ==========================================================================
   Patient list
   ========================================================================== */
.emr-filters--list { grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(140px, 1fr)); }
.emr-kbd { font: 500 11px/1 var(--emr-font-mono); border: 1px solid var(--emr-line); border-radius: 4px; padding: 2px 5px; color: var(--emr-ink-2); margin-left: 6px; }
.emr-person { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.emr-chip { display: inline-block; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--emr-primary-soft); color: var(--emr-primary); margin: 0 4px 4px 0; white-space: nowrap; }
.emr-table--patients td { vertical-align: middle; }
.emr-table--patients tbody tr:hover { background: var(--emr-surface-2); }
.emr-row-actions { white-space: nowrap; text-align: right; }
.emr-menu { display: inline-block; position: relative; margin-left: 6px; }
.emr-menu__button { list-style: none; cursor: pointer; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--emr-line); border-radius: var(--emr-radius-sm); font-size: 18px; line-height: 1; color: var(--emr-ink-2); }
.emr-menu__button::-webkit-details-marker { display: none; }
.emr-menu__button:focus-visible { outline: none; box-shadow: var(--emr-focus); }
.emr-menu__list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 180px; padding: 6px;
  background: var(--emr-surface); border: 1px solid var(--emr-line); border-radius: var(--emr-radius); box-shadow: var(--emr-shadow); text-align: left; }
.emr-menu__list a, .emr-menu__list button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--emr-radius-sm);
  font: inherit; font-size: 14px; color: var(--emr-ink); background: none; border: 0; cursor: pointer; text-decoration: none; }
.emr-app .emr-menu__list a { color: var(--emr-ink); }
.emr-menu__list a:hover, .emr-menu__list button:hover { background: var(--emr-surface-2); }
.emr-menu__list .is-danger { color: var(--emr-danger); }
.emr-pager__controls { display: inline-flex; align-items: center; gap: 8px; }
.emr-input--sm { min-height: 36px; padding: 6px 8px; width: auto; }
[aria-busy="true"] { opacity: .55; transition: opacity .15s; }
@media (max-width: 900px) { .emr-filters--list { grid-template-columns: 1fr 1fr; } .emr-field--grow { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .emr-table--patients td[data-label="Actions"] { padding-left: 14px; text-align: left; }
  .emr-table--patients td[data-label="Actions"]::before, .emr-table--patients td[data-label="Patient"]::before { display: none; }
  .emr-table--patients td[data-label="Patient"] { padding-left: 14px; }
}

/* ==========================================================================
   Patient chart header
   ========================================================================== */
.emr-chart-head { min-height: 0; background: none; margin-bottom: 18px; }
.emr-crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--emr-ink-2); margin: 0 0 10px; }
.emr-crumbs a { color: var(--emr-primary); }
.emr-chart-card { background: var(--emr-surface); border: 1px solid var(--emr-line); border-radius: var(--emr-radius-lg); padding: 20px 22px; }
.emr-chart-card__top { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: flex-start; }
.emr-chart-id { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.emr-chart-avatar { width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  background: var(--emr-panel); color: var(--emr-panel-accent); font: 600 19px/1 var(--emr-font-display); }
.emr-chart-name { font: 600 26px/1.15 var(--emr-font-display); letter-spacing: -.01em; margin: 2px 0 6px; color: var(--emr-ink); }
.emr-chart-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; color: var(--emr-ink-2); font-size: 14px; }
.emr-chart-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.emr-chart-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.emr-chart-actions .emr-btn + .emr-btn { margin-top: 0; }
.emr-allergy { margin: 16px 0 0; padding: 10px 14px; border-radius: var(--emr-radius); background: var(--emr-surface-2); color: var(--emr-ink-2); font-size: 14px; }
.emr-allergy--alert { background: var(--emr-danger-soft); color: var(--emr-ink); border-left: 4px solid var(--emr-danger); }
.emr-allergy--alert strong { color: var(--emr-danger); }
.emr-allergy__notes { color: var(--emr-ink-2); }
.emr-chart-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 24px; margin: 16px 0 0; }
.emr-chart-facts dt { font: 500 11px/1 var(--emr-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--emr-ink-2); margin-bottom: 6px; }
.emr-chart-facts dd { margin: 0; font-size: 14px; color: var(--emr-ink); }
.emr-access-log { min-height: 0; background: none; }
@media (max-width: 760px) {
  .emr-chart-card { padding: 16px; }
  .emr-chart-name { font-size: 22px; }
  .emr-chart-avatar { width: 44px; height: 44px; font-size: 16px; }
}
.emr-app kbd.emr-kbd { background: var(--emr-surface-2); color: var(--emr-ink-2); box-shadow: none; }
@media (max-width: 760px) { .emr-app kbd.emr-kbd { display: none; } }

/* ==========================================================================
   Patient chart body: tabs, summary, profile
   ========================================================================== */
.emr-tabbar { min-height: 0; background: none; position: sticky; top: 64px; z-index: 20; margin: 0 0 16px; }
.emr-tabs { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; margin: 0; padding: 0 4px;
  background: var(--emr-canvas); border-bottom: 1px solid var(--emr-line); scrollbar-width: none; }
.emr-tabs::-webkit-scrollbar { display: none; }
.emr-tabs .nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--emr-ink-2);
  font: 600 14px/1 var(--emr-font); white-space: nowrap; }
.emr-tabs .nav-link:hover { color: var(--emr-ink); }
.emr-tabs .nav-link.active { color: var(--emr-primary); border-bottom-color: var(--emr-primary); background: none; }
.emr-tabs .nav-link:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--emr-primary); border-radius: var(--emr-radius-sm); }

.emr-chart-body > .tab-pane > .emr-app { min-height: 0; background: none; }
.emr-chart-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.emr-chart-side { display: grid; gap: 16px; }
.emr-profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }

.emr-history { padding: 16px 18px 6px; }
.emr-history__row { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 8px 16px; align-items: start;
  padding: 14px 0; border-top: 1px solid var(--emr-line); }
.emr-history__row:first-of-type { border-top: 0; }
.emr-history__label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--emr-ink); }
.emr-history__label .emr-icon { color: var(--emr-ink-2); }
.emr-history__row--alert .emr-history__label, .emr-history__row--alert .emr-history__label .emr-icon { color: var(--emr-danger); }
.emr-history__body { font-size: 14px; line-height: 1.6; color: var(--emr-ink); min-width: 0; }
.emr-rich p { margin: 0 0 6px; }
.emr-rich ul, .emr-rich ol { margin: 0 0 6px; padding-left: 18px; }
.emr-clamp.is-clamped { max-height: 7.5em; overflow: hidden; position: relative; }
.emr-clamp.is-clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.5em;
  background: linear-gradient(to bottom, transparent, var(--emr-surface)); }
.emr-clamp.is-clamped.is-open { max-height: none; }
.emr-clamp.is-clamped.is-open::after { display: none; }
.emr-clamp__toggle { grid-column: 2; justify-self: start; margin-top: -4px; }

/* Link-style buttons (also neutralise the legacy solid .edit-btn look). */
.emr-app .emr-link-btn, .emr-app .emr-link-btn.edit-btn {
  background: none; border: 0; padding: 4px 6px; border-radius: var(--emr-radius-sm); transform: none;
  color: var(--emr-primary); font: 600 13.5px/1.2 var(--emr-font); cursor: pointer; }
.emr-app .emr-link-btn:hover, .emr-app .emr-link-btn.edit-btn:hover { background: var(--emr-primary-soft); color: var(--emr-primary); transform: none; }
.emr-app .emr-link-btn:focus-visible { outline: none; box-shadow: var(--emr-focus); }

.emr-dl { margin: 0; display: grid; gap: 0; }
.emr-dl > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--emr-line); }
.emr-dl > div:first-child { border-top: 0; }
.emr-dl dt { font-size: 13px; color: var(--emr-ink-2); font-weight: 400; }
.emr-dl dd { margin: 0; font-size: 14px; color: var(--emr-ink); }
.emr-break { overflow-wrap: anywhere; }

@media (max-width: 1100px) { .emr-chart-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .emr-tabbar { top: 64px; margin: 0 -16px 12px; }
  .emr-tabs { padding: 0 12px; }
  .emr-tabs .nav-link { padding: 12px 10px; }
  .emr-history__row { grid-template-columns: minmax(0, 1fr) auto; }
  .emr-history__body { grid-column: 1 / -1; grid-row: 2; }
  .emr-clamp__toggle { grid-column: 1; }
  .emr-dl > div { grid-template-columns: 120px minmax(0, 1fr); }
  .emr-profile-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Chart tabs built earlier (Timeline, Documents, Referrals): re-themed with
   the design tokens. Scoped to the chart body; markup and scripts unchanged.
   -------------------------------------------------------------------------- */
.emr-chart-body { font-family: var(--emr-font); color: var(--emr-ink); }
.emr-chart-body .btn { border-radius: var(--emr-radius-sm); font-weight: 600; box-shadow: none; }
.emr-chart-body .btn-primary, .emr-chart-body .soap-download-btn, .emr-chart-body .cw-timeline-btn:not(.cw-timeline-btn-soft) {
  background: var(--emr-primary); border-color: var(--emr-primary); color: var(--emr-primary-ink); background-image: none; }
.emr-chart-body .btn-primary:hover, .emr-chart-body .soap-download-btn:hover { background: var(--emr-primary-hover); border-color: var(--emr-primary-hover); }
.emr-chart-body .btn-outline-primary { color: var(--emr-primary); border-color: var(--emr-primary); background: transparent; }
.emr-chart-body .btn-outline-primary:hover { background: var(--emr-primary-soft); color: var(--emr-primary); }
.emr-chart-body .btn-outline-secondary, .emr-chart-body .btn-secondary, .emr-chart-body .cw-timeline-btn-soft {
  color: var(--emr-ink); background: var(--emr-surface); border: 1px solid var(--emr-line); background-image: none; }
.emr-chart-body .btn-outline-secondary:hover, .emr-chart-body .btn-secondary:hover, .emr-chart-body .cw-timeline-btn-soft:hover { background: var(--emr-surface-2); color: var(--emr-ink); }
.emr-chart-body .btn:focus-visible { box-shadow: var(--emr-focus); outline: none; }

.emr-chart-body .form-control, .emr-chart-body .form-select, .emr-chart-body .cw-timeline-input, .emr-chart-body .cw-timeline-select {
  border: 1px solid var(--emr-line); border-radius: var(--emr-radius); background-color: var(--emr-surface); color: var(--emr-ink); font-family: var(--emr-font); box-shadow: none; }
.emr-chart-body .form-control:focus, .emr-chart-body .form-select:focus, .emr-chart-body .cw-timeline-input:focus, .emr-chart-body .cw-timeline-select:focus {
  border-color: var(--emr-primary); box-shadow: var(--emr-focus); }

.emr-chart-body .card, .emr-chart-body .cw-timeline-panel, .emr-chart-body .medical-card, .emr-chart-body .referral-table-wrap {
  background: var(--emr-surface); border: 1px solid var(--emr-line); border-radius: var(--emr-radius); box-shadow: none; }
.emr-chart-body .card-header { background: var(--emr-surface-2); border-bottom: 1px solid var(--emr-line); font-weight: 600; }
.emr-chart-body .soap-download-toolbar, .emr-chart-body .referral-toolbar {
  background: var(--emr-surface); background-image: none; border: 1px solid var(--emr-line); border-radius: var(--emr-radius); box-shadow: none; color: var(--emr-ink); }
.emr-chart-body .soap-download-toolbar-title, .emr-chart-body .referral-toolbar-title, .emr-chart-body .cw-timeline-title { color: var(--emr-ink); font-family: var(--emr-font-display); }
.emr-chart-body .soap-download-toolbar-title i, .emr-chart-body .referral-toolbar-title i { color: var(--emr-primary); }
.emr-chart-body .soap-download-status { background: var(--emr-primary-soft); color: var(--emr-primary); border-color: transparent; }

.emr-chart-body .table { color: var(--emr-ink); font-size: 14px; }
.emr-chart-body .table > thead th { background: var(--emr-surface-2); color: var(--emr-ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; border-bottom: 1px solid var(--emr-line); }
.emr-chart-body .table > tbody td { border-color: var(--emr-line); vertical-align: middle; }
.emr-chart-body .table-hover > tbody > tr:hover > * { background: var(--emr-surface-2); --bs-table-accent-bg: transparent; }
.emr-chart-body .soap-note-type-badge, .emr-chart-body .referral-type-badge, .emr-chart-body .cw-timeline-pill {
  background: var(--emr-primary-soft); color: var(--emr-primary); border: 0; border-radius: 999px; font-weight: 600; }
.emr-chart-body .pagination .page-link { color: var(--emr-primary); border-color: var(--emr-line); background: var(--emr-surface); }
.emr-chart-body .pagination .page-item.active .page-link { background: var(--emr-primary); border-color: var(--emr-primary); color: var(--emr-primary-ink); }

/* Sub-tabs inside Documents: same underline style as the chart tabs. */
.emr-chart-body .soap_tabs, .emr-chart-body .nav-tabs { border-bottom: 1px solid var(--emr-line); gap: 2px; }
.emr-chart-body .nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--emr-ink-2); font-weight: 600; background: none; }
.emr-chart-body .nav-tabs .nav-link.active { color: var(--emr-primary); border-bottom-color: var(--emr-primary); background: none; }

.emr-chart-body .cw-timeline-action { color: var(--emr-primary); }
.emr-chart-body .cw-timeline-stat { background: var(--emr-surface-2); border-color: var(--emr-line); color: var(--emr-ink); }
.emr-chart-body .empty-state, .emr-chart-body .cw-timeline-empty { color: var(--emr-ink-2); }

/* Timeline: teal rail, calm cards, one action style. */
.emr-chart-body .cw-timeline-toolbar { background: var(--emr-surface); background-image: none; border: 1px solid var(--emr-line); border-radius: var(--emr-radius); box-shadow: none; }
.emr-chart-body .cw-timeline-list::before { background: var(--emr-line); width: 2px; }
.emr-chart-body .cw-timeline-card { border: 1px solid var(--emr-line); border-radius: var(--emr-radius); box-shadow: none; }
.emr-chart-body .cw-timeline-card:hover { border-color: var(--emr-primary); box-shadow: none; transform: none; }
.emr-chart-body .cw-timeline-card::before { background: var(--emr-primary); border-color: var(--emr-surface); box-shadow: 0 0 0 4px var(--emr-primary-soft); }
.emr-chart-body .cw-timeline-badge { background: var(--emr-primary-soft); color: var(--emr-primary); border-color: transparent; }
.emr-chart-body .cw-timeline-stat.dark { background: var(--emr-panel); color: var(--emr-panel-ink); border-color: var(--emr-panel); }
.emr-chart-body .cw-timeline-btn-dark, .emr-chart-body .cw-timeline-btn-primary { background: var(--emr-primary); border-color: var(--emr-primary); color: var(--emr-primary-ink); background-image: none; }
.emr-chart-body .cw-timeline-action,
.emr-chart-body .cw-timeline-action.success,
.emr-chart-body .cw-timeline-action.orange,
.emr-chart-body .cw-timeline-action.dark { background: var(--emr-surface); border: 1px solid var(--emr-line); color: var(--emr-ink); font-weight: 600; }
.emr-chart-body .cw-timeline-action:hover { background: var(--emr-surface-2); border-color: var(--emr-primary); color: var(--emr-primary); }
.emr-chart-body .cw-timeline-empty { border-color: var(--emr-line); }
@media (max-width: 760px) {
  .emr-chart-actions { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; width: calc(100% + 32px); }
  .emr-chart-actions::-webkit-scrollbar { display: none; }
  .emr-chart-actions .emr-btn { flex: 0 0 auto; }
  .emr-chart-facts { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .emr-chart-facts > div:nth-child(-n+2) { grid-column: 1 / -1; }
}
.emr-chart-body .cw-timeline-btn, .emr-chart-body .soap-download-btn { box-shadow: none; }

/* Circle dashboard: weekly visit columns (single hue per clinic, small multiples) */
.emr-weekly + .emr-weekly { margin-top: 18px; }
.emr-weekly__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; margin-bottom: 8px; }
.emr-weekly__bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; border-bottom: 1px solid var(--emr-line); }
.emr-weekly__bar { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; }
.emr-weekly__bar > span { display: block; width: 100%; min-height: 2px; background: var(--emr-data); border-radius: 4px 4px 0 0; }
.emr-weekly__bar:hover > span { filter: brightness(1.1); }
.emr-weekly__labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--emr-ink-2); margin-top: 4px; }
a.emr-stat:focus-visible { outline: none; box-shadow: var(--emr-focus); }
.emr-segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 16px; background: var(--emr-surface); border: 1px solid var(--emr-line); border-radius: var(--emr-radius); }
.emr-app .emr-segmented a { padding: 7px 12px; border-radius: var(--emr-radius-sm); color: var(--emr-ink-2); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.emr-app .emr-segmented a:hover { background: var(--emr-surface-2); color: var(--emr-ink); }
.emr-app .emr-segmented a[aria-current="page"] { background: var(--emr-primary-soft); color: var(--emr-primary); }
.emr-badge + .emr-badge { margin-left: 4px; }
