#emr [hidden] { display: none !important; }
/* Casa EMR (the EMR tab, section#emr). Every rule is scoped to #emr so
   nothing here changes the rest of Casa. Casa's navy and gold; AxisCare's layout (spec §13):
   lists with a count and filter chips, record pages with a header band and
   a tab bar, cards that read "Label: value" until Edit. */
#emr {
  --navy: #1e3a5f; --navy-dark: #15293f; --navy-soft: #2c4f7c; --gold: #d4a044; --gold-bg: #fbf3e3;
  --ink: #111827; --ink-2: #374151; --sub: #6b7280; --line: #e5e7eb; --line-2: #d1d5db; --bg: #f4f5f7; --card: #fff;
  --green: #15803d; --green-bg: #e7f5ec; --red: #b91c1c; --red-bg: #fdeaea; --amber: #b45309; --amber-bg: #fdf3e6;
  --blue: #1d4ed8; --blue-bg: #e8effd; --grey-bg: #eef0f3; --purple: #6d28d9; --purple-bg: #f1ebfd;
}
#emr * { box-sizing: border-box; }
#emr { color: var(--ink); font: 14px/1.45 Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
#emr a { color: var(--navy-soft); }
#emr button, #emr input, #emr select, #emr textarea { font: inherit; }







#emr .eShell { display: flex; min-height: calc(100vh - var(--ribbon-h, 96px) - 40px); background: #fff; border: 1px solid var(--line); border-radius: 14px; }
#emr .eRail { width: 210px; flex: none; background: #fff; border-right: 1px solid var(--line); padding: 10px 8px; position: sticky; top: var(--ribbon-h, 96px); align-self: flex-start; height: calc(100vh - var(--ribbon-h, 96px) - 20px); border-radius: 14px 0 0 14px; overflow-y: auto; }
#emr .eRail a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
#emr .eRail a:hover { background: var(--grey-bg); }
#emr .eRail a.on { background: var(--navy); color: #fff; }
#emr .eIc { width: 20px; text-align: center; }
#emr .eRailGroup { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--sub); font-weight: 700; margin: 14px 10px 4px; }
#emr .eMain { flex: 1; min-width: 0; padding: 18px 22px 40px; background: var(--bg); border-radius: 0 14px 14px 0; }
#emr .eEmpty { color: var(--sub); padding: 30px 0; text-align: center; }
#emr .eHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
#emr .eHead h1 { font-family: "Playfair Display", Georgia, serif; color: var(--navy); font-size: 26px; margin: 0; }
#emr .eHead h1 .eCount { font-family: inherit; font-size: 15px; color: var(--sub); margin-left: 8px; font-weight: 500; }
#emr .eBar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
#emr .eSearch { flex: 1; min-width: 200px; max-width: 420px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
#emr .eChip { border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
#emr .eChip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
#emr .btn { border: 1px solid var(--line-2); background: #fff; color: var(--navy); padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; }
#emr .btn:hover { border-color: var(--navy); }
#emr .btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
#emr .btn.gold { background: var(--gold); border-color: var(--gold); color: #2a2110; }
#emr .btn.danger { color: var(--red); }
#emr .btn.small { padding: 4px 9px; font-size: 12px; }
#emr .btn[disabled] { opacity: .5; cursor: default; }
#emr .eTableWrap { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
#emr table.eTable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
#emr .eTable th { text-align: left; background: #f3f5f8; color: var(--ink-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
#emr .eTable td { padding: 9px 12px; border-bottom: 1px solid #eef0f3; vertical-align: top; }
#emr .eTable tbody tr:nth-child(even) td { background: #fafbfc; }
#emr .eTable tbody tr.click { cursor: pointer; }
#emr .eTable tbody tr.click:hover td { background: #f0f4fa; }
#emr .eTable td.num, #emr .eTable th.num { text-align: right; font-variant-numeric: tabular-nums; }
#emr .pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--grey-bg); color: var(--ink-2); white-space: nowrap; }
#emr .pill.good { background: var(--green-bg); color: var(--green); } #emr .pill.bad { background: var(--red-bg); color: var(--red); }
#emr .pill.warn { background: var(--amber-bg); color: var(--amber); } #emr .pill.info { background: var(--blue-bg); color: var(--blue); } #emr .pill.county { background: var(--gold-bg); color: #7a5a1a; text-transform: uppercase; }
#emr .muted { color: var(--sub); }
/* Record header band + tabs */
#emr .eBand { background: var(--navy); color: #fff; border-radius: 12px; padding: 14px 18px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
#emr .eBand h1 { margin: 0; color: #fff; font-family: "Playfair Display", Georgia, serif; font-size: 24px; }
#emr .eBadge { display: inline-block; margin-left: 10px; font-size: 11.5px; letter-spacing: .06em; background: rgba(255,255,255,.14); padding: 3px 9px; border-radius: 6px; vertical-align: 4px; font-family: Inter, sans-serif; }
#emr .eBandSub { opacity: .85; font-size: 13px; margin-top: 4px; }
#emr .eBandRight { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#emr .eBand .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
#emr .eTabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 2px solid var(--line); margin-bottom: 14px; }
#emr .eTabs a { padding: 9px 14px; text-decoration: none; color: var(--sub); font-weight: 700; font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; }
#emr .eTabs a.on { color: var(--navy); border-bottom-color: var(--gold); }
/* Cards */
#emr .eCards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
#emr .eCard { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
#emr .eCardHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f8f9fb; }
#emr .eCardHead h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); }
#emr .eCardBody { padding: 12px 14px; }
#emr .eKv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 12px; }
#emr .eKv dt { color: var(--sub); font-size: 12.5px; }
#emr .eKv dd { margin: 0; overflow-wrap: anywhere; }
#emr .eForm { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 12px; }
#emr .eForm label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--sub); font-weight: 600; min-width: 0; }
#emr .eForm label.wide { grid-column: 1 / -1; }
#emr .eForm label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; font-size: 13.5px; }
#emr .eForm input:not([type=checkbox]), #emr .eForm select, #emr .eForm textarea { padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; color: var(--ink); width: 100%; }
#emr .eForm textarea { min-height: 80px; resize: vertical; }
#emr .eFormBtns { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
#emr .eMsg { color: var(--red); font-size: 12.5px; }
#emr .eSection { margin-top: 18px; }
#emr .eSection h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); margin: 0 0 8px; display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
/* Calendar */
#emr .eCalBar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
#emr .eCalBar .eMonth { font-weight: 800; font-size: 16px; color: var(--navy); min-width: 150px; text-align: center; }
#emr .eCal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) 64px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
#emr .eCal .dh { background: #f3f5f8; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); padding: 6px 8px; border-bottom: 1px solid var(--line); }
#emr .eCal .day { min-height: 104px; border-right: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; padding: 4px 5px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
#emr .eCal .day.out { background: #fafbfc; }
#emr .eCal .day.out .dn { color: #b6bcc6; }
#emr .eCal .day.today .dn { background: var(--gold); color: #2a2110; border-radius: 6px; padding: 0 5px; }
#emr .eCal .dn { font-size: 12px; font-weight: 700; color: var(--ink-2); display: flex; justify-content: space-between; }
#emr .eCal .dn small { font-weight: 600; color: var(--sub); }
#emr .eCal .wk { background: #f8f9fb; border-bottom: 1px solid #eef0f3; font-size: 11.5px; font-weight: 700; color: var(--navy); padding: 6px; text-align: center; }
#emr .chipV { display: block; border-radius: 6px; padding: 3px 6px; font-size: 11px; line-height: 1.3; border-left: 4px solid; cursor: pointer; background: var(--blue-bg); border-color: var(--blue); color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
#emr .chipV b { font-weight: 700; }
#emr .chipV.st-unassigned { background: var(--red-bg); border-color: var(--red); }
#emr .chipV.st-verified { background: var(--green-bg); border-color: var(--green); }
#emr .chipV.st-completed { background: #e6f4f4; border-color: #0f766e; }
#emr .chipV.st-in_progress { background: var(--purple-bg); border-color: var(--purple); }
#emr .chipV.st-missed { background: var(--amber-bg); border-color: var(--amber); }
#emr .chipV.st-removed { background: var(--grey-bg); border-color: #9ca3af; color: var(--sub); text-decoration: line-through; }
#emr .eLegend { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; font-size: 12px; }
#emr .eLegend span { display: inline-flex; align-items: center; gap: 5px; }
#emr .eLegend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
#emr .eUtil { display: grid; gap: 8px; }
#emr .eUtilRow { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 10px; align-items: center; }
#emr .eBarTrack { height: 10px; border-radius: 5px; background: #eef0f3; overflow: hidden; }
#emr .eBarTrack i { display: block; height: 100%; background: var(--green); }
#emr .eBarTrack i.over { background: var(--red); }
/* Visit panel */
#emr .ePanel { position: fixed; top: var(--ribbon-h, 96px); right: 0; bottom: 0; width: min(560px, 100%); background: #fff; z-index: 600; box-shadow: -12px 0 30px rgba(0,0,0,.18); display: flex; flex-direction: column; }
#emr .ePanelHead { background: var(--navy); color: #fff; padding: 12px 16px; display: flex; justify-content: space-between; gap: 10px; }
#emr .ePanelHead h2 { margin: 0; font-size: 18px; color: #fff; }
#emr .ePanelHead .x { background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 8px; width: 36px; height: 36px; font-size: 20px; cursor: pointer; flex: none; }
#emr .ePanelActs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
#emr .ePanel .eTabs { padding: 0 10px; margin-bottom: 0; }
#emr .ePanelBody { flex: 1; overflow-y: auto; padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
#emr .eExc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
#emr .eClock { background: #f8f9fb; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
#emr .eList { list-style: none; margin: 0; padding: 0; }
#emr .eList li { padding: 8px 0; border-bottom: 1px solid #eef0f3; }
/* Modal, toast */
#emr .eModalBack { position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 800; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
#emr .eModal { background: #fff; border-radius: 14px; width: min(760px, 100%); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
#emr .eModal .eCardHead { border-radius: 14px 14px 0 0; }
#emr .eToast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 900; box-shadow: 0 8px 20px rgba(0,0,0,.2); max-width: calc(100% - 32px); }
#emr .eDays { display: flex; gap: 4px; flex-wrap: wrap; }
#emr .eDays label { flex-direction: row !important; align-items: center; gap: 3px !important; border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 7px; color: var(--ink) !important; font-weight: 600 !important; }
/* EVV board: HHAX status line, the tiles (the filter), HHAX errors */
#emr .eHxBar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
#emr .eTiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
#emr .eTile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 10px; padding: 8px 12px; cursor: pointer; font: inherit; color: var(--ink-2); }
#emr .eTile span { font-size: 12px; font-weight: 600; }
#emr .eTile b { font-size: 20px; color: var(--navy); font-variant-numeric: tabular-nums; }
#emr .eTile.bad { border-left-color: var(--red); } #emr .eTile.bad b { color: var(--red); }
#emr .eTile.on { border-color: var(--navy); border-left-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #f3f6fb; }
#emr .eHxErr { color: var(--red); font-size: 12.5px; margin-top: 4px; }
#emr .eHxPre { background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 10px; font-size: 12px; overflow-x: auto; max-height: 320px; white-space: pre; }
#emr .eHhax h2 span { display: flex; gap: 6px; }
@media (max-width: 760px) {
  #emr .eTiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  #emr .eTile { padding: 6px 8px; } #emr .eTile span { font-size: 11px; } #emr .eTile b { font-size: 17px; }
  body.hasMobNav #emr .ePanel { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  body.hasMobNav #emr .eToast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  #emr .eShell { border-radius: 10px; }
  #emr .eMain { border-radius: 0 0 10px 10px; }
  #emr .eShell { flex-direction: column; }
  #emr .eRail { width: 100%; height: auto; position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  #emr .eRail a { white-space: nowrap; padding: 7px 10px; }
  #emr .eRail .eIc { display: none; }
  #emr .eRailGroup { display: none; }
  #emr .eMain { padding: 12px 16px 60px; }
  #emr .eCards { grid-template-columns: minmax(0, 1fr); }
  #emr .eCal { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  #emr .eCal .wk, #emr .eCal .dh.wkh { display: none; }
  #emr .eCal .day { min-height: 70px; padding: 3px; }
  #emr .chipV { font-size: 10px; padding: 2px 3px; }
  #emr .chipV .cg, #emr .chipV .sv { display: none; }
  #emr .eUtilRow { grid-template-columns: minmax(0, 1fr); }
  #emr .eKv { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  #emr .eKv dd { margin-bottom: 8px; }
  #emr .ePanelHead .x { width: 44px; height: 44px; }
}

/* EMR > Schedule: the week for every client */
#emr .eNote { background: var(--blue-bg); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; color: var(--ink-2); }
#emr .eWeek th, #emr .eWeek td { vertical-align: top; min-width: 96px; }
#emr .eWeek td:first-child { min-width: 150px; }
#emr .eWeek .chipV + .chipV { margin-top: 4px; }
#emr .eWeek .eToday { background: var(--gold-bg); }
#emr .eWeekList { display: none; }
@media (max-width: 760px) {
  #emr .eWeek, #emr .eTableWrap:has(> .eWeek) { display: none; }
  #emr .eWeekList { display: grid; gap: 8px; }
  #emr .eWeekCard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
  #emr .eWeekTop { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 700; }
  #emr .eWeekDay { display: grid; grid-template-columns: 78px 1fr; gap: 8px; align-items: start; border-radius: 6px; padding: 2px 4px; }
  #emr .eWeekDay > span { font-size: 12px; color: var(--sub); padding-top: 3px; }
  #emr .eWeekDay .chipV { display: inline-block; margin: 0 4px 4px 0; }
}

/* EMR > Home Help 1904s and Payroll */
#emr .eIssues { margin: 0; padding-left: 16px; color: var(--amber); font-size: 12.5px; }
#emr .eNowrap { white-space: nowrap; }
#emr tr.eSub td { background: var(--grey-bg); font-size: 13px; }
#emr .eIssues li { margin: 0; padding: 0; line-height: 1.35; }
@media (max-width: 760px) {
  #emr .eStack thead { display: none; }
  #emr .eStack, #emr .eStack tbody, #emr .eStack tr, #emr .eStack td { display: block; width: 100%; }
  #emr .eStack tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  #emr .eStack td { border: 0; padding: 2px 12px; }
  #emr .eStack td[data-l]::before { content: attr(data-l) ": "; color: var(--sub); font-size: 12px; }
}

/* Plan of care */
#emr .eNote.eWarn { background: var(--amber-bg); }
#emr .ePlanGrid td, #emr .ePlanGrid th { padding: 4px 6px; text-align: center; }
#emr .ePlanGrid td:first-child, #emr .ePlanGrid th:first-child { text-align: left; }
#emr .ePlanAll { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; cursor: pointer; }
#emr .eForm > div.wide { grid-column: 1 / -1; min-width: 0; }
#emr .eForm input.ePlanMin { width: 76px; }
#emr .eModal details summary { cursor: pointer; margin: 8px 0; font-weight: 700; }

/* Import schedule workbooks: how many clients are on the calendar */
#emr .eCovHead { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
#emr .eCovBar { display: flex; height: 14px; border-radius: 999px; background: var(--grey-bg); overflow: hidden; }
#emr .eCovBar.thin { height: 8px; margin: 8px 0 4px; }
#emr .eCovBar .ok { background: var(--green); transition: width .3s; }
#emr .eCovBar .half { background: var(--amber); }
#emr .eFar { color: var(--red); }

/* Services on hold (holds.js): the banner under the client's name. */
#emr .eHold { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
#emr .eHoldBtns { display: flex; gap: 6px; flex-wrap: wrap; }
#emr .eHoldLine { display: flex; gap: 6px; justify-content: flex-end; margin: 0 0 8px; }
#emr .eHistory > summary { cursor: pointer; font-weight: 700; color: var(--navy); margin: 4px 0 8px; }
#emr .eHoldPill { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--amber-bg); color: #92400e; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }

/* HHAX Phase 1 tests (EVV page) */
#emr .eHxTests { padding: 12px 14px; margin-bottom: 12px; overflow: visible; }
#emr .eHxTests .eWarn { background: #fdf3e6; color: #b45309; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
#emr .eHxTests td { font-size: 12.5px; vertical-align: top; }
/* The client's signature for the ADLs, from Casa Care's clock-out (27 Oct 2026). */
#emr .eSig { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
#emr .eSig img { flex-basis: 100%; max-width: 320px; width: 100%; height: auto; border: 1px solid var(--line, #e2e8f0); border-radius: 8px; background: #fff; }
/* Authorized / used / scheduled ahead / left (28 Oct 2026). */
#emr .eUtil4 { display: block; }
#emr .eUtilHead { margin-bottom: 6px; }
#emr .eBar2 { display: flex; }
#emr .eBar2 i.used { background: var(--green); }
#emr .eBar2 i.ahead { background: #60a5fa; }
#emr .eUtilNums { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 8px; font-variant-numeric: tabular-nums; }
#emr .eUtilNums span { display: flex; flex-direction: column; }
#emr .eUtilNums small { font-size: 11px; color: var(--muted, #64748b); text-transform: uppercase; letter-spacing: .04em; }
#emr .eUtilNums .used b { color: var(--green); }
#emr .eUtilNums .ahead b { color: #2563eb; }
#emr .eUtilNums .over b { color: var(--red); }
/* Set up services (the onboarding steps for a client). */
#emr .eWizSteps { display: flex; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
#emr .eWizSteps span, .eWizSteps span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #eef0f3; color: #475569; }
#emr .eWizSteps span.on, .eWizSteps span.on { background: #1e3a5f; color: #fff; }
#emr .eWizSteps span.done, .eWizSteps span.done { background: #dcfce7; color: #166534; }
.eWizChoice { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 8px 0; }
.eWizChoice button { text-align: left; padding: 12px; border: 1px solid #d0d7de; border-radius: 10px; background: #fff; cursor: pointer; font: inherit; }
.eWizChoice button b { display: block; margin-bottom: 4px; }
.eWizChoice button.on { border-color: #1e3a5f; box-shadow: 0 0 0 2px #1e3a5f22; }
.eWizRow { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px; margin-bottom: 8px; }
#emr .eSearchBar input[type=search] { flex: 1; max-width: 420px; padding: 8px 10px; border: 1px solid #d0d7de; border-radius: 8px; font: inherit; }

/* Visits (29 Oct 2026, after HCM's Visits page): dates, patient,
   caregiver and contract across the top; scheduled and confirmed hours
   at the bottom. */
#emr .eVisitBar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
#emr .eFld { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#emr .eFld small { font-size: 11px; color: var(--sub); font-weight: 600; }
#emr .eFld input, #emr .eFld select { padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; min-width: 0; }
#emr .eFld input[type="search"] { width: 200px; max-width: 100%; }
#emr .eRange { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#emr .eVisits td { vertical-align: top; }
#emr .eVisits .small, #emr .eDash .small { font-size: 12px; }
#emr .eVisitTotals { display: flex; flex-wrap: wrap; gap: 18px; padding: 10px 12px; margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
#emr .eVisitTotals b { color: var(--navy); font-variant-numeric: tabular-nums; }
#emr .eHxBar { margin-top: 12px; }

/* The EMR dashboard. */
#emr .eDashH { font-size: 15px; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
#emr .eDashH .muted { font-weight: 500; font-size: 13px; }
#emr .eKpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
#emr .eKpi { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 10px; padding: 9px 12px; font: inherit; color: var(--ink-2); cursor: pointer; }
#emr .eKpi:not([data-go-tile]) { cursor: default; }
#emr .eKpi small { font-size: 12px; font-weight: 600; }
#emr .eKpi b { font-size: 22px; color: var(--navy); font-variant-numeric: tabular-nums; }
#emr .eKpi span { font-size: 11.5px; }
#emr .eKpi.good { border-left-color: var(--green); } #emr .eKpi.good b { color: var(--green); }
#emr .eKpi.warn { border-left-color: var(--amber); } #emr .eKpi.warn b { color: var(--amber); }
#emr .eKpi.bad { border-left-color: var(--red); } #emr .eKpi.bad b { color: var(--red); }
#emr .eKpi.info { border-left-color: var(--blue); }
#emr .eDashCols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
#emr .eDashCols .eCard { padding: 12px 14px; min-width: 0; }
#emr .eDashCols h3 { margin: 0 0 8px; font-size: 14px; }
#emr .eDashList { display: flex; flex-direction: column; }
#emr .eDashList a { display: block; padding: 6px 0; border-top: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 13px; }
#emr .eDashList a:first-child { border-top: none; }
#emr .eDashList a:hover { color: var(--navy); }

/* A client at a glance: authorization, contract, master weekly schedule. */
#emr .eGlance { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
#emr .eGlanceRow { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 10px; }
#emr .eGlanceBox { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--bg); border-radius: 8px; min-width: 0; }
#emr .eGlanceBox small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--sub); font-weight: 700; }
#emr .eGlanceBox b { font-size: 16px; color: var(--navy); }
#emr .eGlanceBox .badText { color: var(--red); }
#emr .eGlanceH { font-size: 13px; margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .05em; color: var(--sub); }
#emr .eWk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
#emr .eWkDay { background: var(--bg); border-radius: 8px; padding: 6px 7px; min-width: 0; }
#emr .eWkDay > b { display: block; font-size: 12px; color: var(--sub); margin-bottom: 4px; }
#emr .eWkSlot { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--navy); border-radius: 6px; padding: 4px 6px; margin-bottom: 4px; font-size: 12.5px; }
#emr .eWkSlot span { display: block; font-weight: 600; }
#emr .eWkSlot small { display: block; color: var(--sub); overflow-wrap: anywhere; }
@media (max-width: 760px) { #emr .eWk { grid-template-columns: repeat(2, minmax(0, 1fr)); } #emr .eFld input[type="search"] { width: 150px; } }

/* The chart header (29 Oct 2026): status and since, coordinator,
   contract, one Status button. */
#emr .eChartHead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; font-size: 13px; }
#emr .eChartSep { padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .35); }
#emr .eChartAct { position: relative; }
#emr .eChartMenu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; display: flex; flex-direction: column; min-width: 190px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 30, 60, .18); padding: 4px; }
#emr .eChartMenu button { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--ink); font: inherit; }
#emr .eChartMenu button:hover { background: var(--grey-bg); }

/* The visit panel's Timecard and EVV. */
#emr .eTc { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: #fff; }
#emr .eTcHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
#emr .eTcGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
#emr .eTcGrid > div { display: flex; flex-direction: column; gap: 1px; font-size: 13px; min-width: 0; }
#emr .eTcGrid small { font-size: 11px; color: var(--sub); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
#emr .eTcGrid b { font-size: 16px; color: var(--navy); }
#emr .eWf { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; font-size: 13px; }
#emr .eWf li { display: flex; gap: 6px; align-items: baseline; }
#emr .eWf li span { width: 14px; text-align: center; font-weight: 700; }
#emr .eWf li.ok span { color: var(--green); } #emr .eWf li.no span { color: var(--red); } #emr .eWf li.na { color: var(--sub); }
#emr .eTcCmp { font-size: 12.5px; margin-bottom: 6px; }
#emr .eTcFoot { font-size: 11.5px; overflow-wrap: anywhere; }

/* Contracts & Authorizations (29 Oct 2026): contracts left, the chosen
   contract's authorization cards right. */
#emr .eCt { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
#emr .eCtHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
#emr .eCtHead h2 { margin: 0; font-size: 16px; }
#emr .eCtLeft { display: flex; flex-direction: column; gap: 6px; }
#emr .eKCard { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 10px; padding: 9px 11px; cursor: pointer; font: inherit; color: var(--ink); }
#emr .eKCard.on { border-color: var(--navy); border-left-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #f3f6fb; }
#emr .eCtRight { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
#emr .eCtOne { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
#emr .eAuthCard { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
#emr .eAuthCard.bad { border-left-color: var(--red); } #emr .eAuthCard.info { border-left-color: var(--blue); } #emr .eAuthCard:not(.good):not(.bad):not(.info) { border-left-color: var(--line-2); opacity: .85; }
#emr .eAuthHead { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
#emr .eAuthLines { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
#emr .eAuthBtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
#emr .eLine { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; }
#emr .eLine .wide { grid-column: 1 / -1; }
#emr .eWkIn { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; }
#emr .eWkIn small { width: 100%; color: var(--sub); font-size: 11.5px; }
#emr .eWkIn label { width: 64px; font-size: 12px; }
#emr .eLetter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--gold-bg); border-radius: 8px; padding: 8px 10px; }
#emr .aiFilled { box-shadow: 0 0 0 2px var(--gold); }
#emr .eAuthDet .eSection h3 { font-size: 14px; margin: 12px 0 6px; }
@media (max-width: 760px) { #emr .eCt { grid-template-columns: minmax(0, 1fr); } }
#emr .eBurn .eOver { color: #ffd2d2; }
#emr .eBurn.over b { color: #ffd2d2; } #emr .eBurn.near b { color: #ffe7a8; }

/* Master week, caregiver links, calendar views (29 Oct 2026). */
#emr .eWkAuth { font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 5px; margin-top: 2px; }
#emr .eWkAuth.good { background: var(--green-bg); color: var(--green); } #emr .eWkAuth.bad { background: var(--red-bg); color: var(--red); }
#emr .eSeg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
#emr .eSeg button { background: #fff; border: 0; padding: 6px 12px; font: inherit; cursor: pointer; color: var(--ink-2); }
#emr .eSeg button.on { background: var(--navy); color: #fff; }
#emr .eWkCal .eWkSlot { cursor: pointer; }
#emr .eWkSlot.eWkEdit { cursor: pointer; } #emr .eWkSlot.eWkEdit:hover, #emr .eWkSlot.eWkEdit:focus { border-color: var(--navy); outline: none; }
#emr .eWkCal .eWkDay.today { box-shadow: inset 0 0 0 2px var(--gold); }
#emr .eWkSlot.st-verified { border-left-color: var(--green); } #emr .eWkSlot.st-missed { border-left-color: var(--amber); } #emr .eWkSlot.st-unassigned { border-left-color: var(--red); } #emr .eWkSlot.st-removed { opacity: .5; text-decoration: line-through; }
/* C confirmed, P paid in payroll, I invoiced, B billed and paid: small circled letters on each visit (3 Nov 2026). */
#emr .eBadgeC { display: inline-grid; place-items: center; width: 16px; height: 16px; font-size: 9.5px; line-height: 1; background: var(--green); color: #fff; border-radius: 50%; margin-left: 3px; vertical-align: 1px; }
#emr .eBadgeC.b { background: var(--navy, #1f3a5f); }
#emr .eBadgeC.p { background: var(--gold, #b8892d); }
#emr .eBadgeC.i { background: #6d4aa8; }
#emr .eMoney { margin: 6px 0; gap: 6px; flex-wrap: wrap; }
#emr .eAuthStrip { margin: 8px 0; }

/* Visit checks, Visit Verification, Time & Attendance (29 Oct 2026). */
#emr .eChecks { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
#emr .eChecksHead { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
#emr .eCheck { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; }
#emr .eVvGroup { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
#emr .eVvGroup > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; }
#emr .eVvGroup > summary::-webkit-details-marker { display: none; }
#emr .eVvGroup > summary .btn { margin-left: auto; }
#emr .eVvGroup .eTableWrap { padding: 0 8px 8px; }
#emr .eVvBtns { white-space: nowrap; } #emr .eVvBtns .btn { margin-right: 4px; }
/* Billing lines and payroll batches (29 Oct 2026). */
#emr .eTile small { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
#emr .eTable tr.eRev td { color: var(--red); }
#emr .eTable tr.eVoid td { opacity: .55; }

/* EMR batch 6 (30 Oct 2026): the list pattern, the "?" guides, plan adherence, the employment timeline. */
#emr .eKit { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: -4px 0 12px; }
#emr .eKit select { min-width: 160px; }
#emr .eKitTotals { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
#emr .eHelp { margin-left: 10px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--navy); font: 600 13px/22px system-ui, sans-serif; cursor: pointer; vertical-align: middle; padding: 0; }
#emr .eHelp:hover { background: var(--blue-bg); }
#emr .eModal .eGuide { margin: 0; padding-left: 18px; display: grid; gap: 8px; line-height: 1.45; max-width: 62ch; }
#emr .eAdhGrid th, #emr .eAdhGrid td.eAdhCell { text-align: center; padding: 6px 4px; min-width: 34px; }
#emr .eAdhGrid th a { color: inherit; text-decoration: none; font-size: 11.5px; line-height: 1.2; }
#emr .eAdh { display: inline-block; width: 22px; height: 22px; line-height: 22px; border-radius: 6px; font-size: 12px; font-weight: 700; background: #f1f3f6; color: var(--sub); text-align: center; }
#emr .eAdh.good { background: var(--green-bg); color: var(--green); } #emr .eAdh.bad { background: var(--red-bg); color: var(--red); } #emr .eAdh.warn { background: var(--amber-bg); color: var(--amber); }
#emr .eAdhKey { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--sub); }
#emr .eTimeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 8px; }
#emr .eTimeline li { position: relative; font-size: 13.5px; }
#emr .eTimeline li::before { content: ''; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
#emr .eTimeline li.ended::before { background: var(--red); }
#emr .eHead .pageActions { margin-left: auto; }
@media (max-width: 760px) { #emr .eKit .eFld { flex: 1 1 100%; } #emr .eKit select { min-width: 0; width: 100%; } }

/* The EVV tiles on the dashboard (3 Nov 2026): five large numbers. */
#emr .eEvvBigs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 4px 0 18px; }
#emr .eEvvBig { background: var(--card, #fff); border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#emr .eEvvBig small { font-size: 13px; font-weight: 700; color: var(--sub); text-transform: uppercase; letter-spacing: .03em; }
#emr .eEvvBig b { font-size: 38px; line-height: 1.1; color: var(--navy); font-variant-numeric: tabular-nums; }
#emr .eEvvBig.good { border-top-color: var(--green); } #emr .eEvvBig.warn { border-top-color: var(--amber); } #emr .eEvvBig.bad { border-top-color: var(--red); }
#emr .eEvvBig.bad b { color: var(--red); }
@media (max-width: 900px) { #emr .eEvvBigs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The client and the caregiver on the Visits tab open their profiles (9 Nov 2026). */
.eClientLink { color: var(--navy, #1e3a5f); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.eClientLink:hover { color: var(--gold-dark, #b9862f); }

/* The authorization a visit links to, briefly lit (9 Nov 2026). */
#emr .eAuthCard.eAuthFocus { box-shadow: 0 0 0 3px var(--gold); transition: box-shadow .3s; }
