:root {
  --text: #333;
  --muted: #777;
  --blue: #5c99cf;          /* table header: rgb(92,153,207) */
  --blue-dark: #4a7fb3;
  --link: #4f70b7;
  --row-alt: #e6e6e6;
  --row-selected: #fff3c4;
  --tab-active: rgba(173,216,230,.5);
  --urgent: #cf1322;
  --urgent-bg: #fff1f0;
  --high: #d4380d;
  --high-bg: #fff2e8;
  --dark: #333;
  --panel-gray: #dcdcdc;
  --font: "Public Sans", "Public Sans Variable", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--text); font-size: 13px; background: #fff; }
a { color: var(--link); }
button { font-family: inherit; cursor: pointer; }

/* top bar */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 0; height: 40px; }
.main-tabs a { color: var(--text); text-decoration: none; font-size: 15px; padding: 1px 6px; margin-right: 12px; border-bottom: 1px solid #d3d3d3; position: relative; }
.main-tabs a.active { font-weight: 700; border-bottom: 3px solid #f00; }
.main-tabs a.active::after { content: ""; position: absolute; top: -4px; right: -3px; width: 5px; height: 5px; background: var(--text); border-radius: 50%; }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 12px; }
.topbar-right select { font-family: inherit; font-size: 13.33px; padding: 2px; height: 23px; border: 1px solid #9b9b9b; border-radius: 5px; background: #fff; }
.icon-btn { background: none; border: 0; font-size: 18px; color: #444; width: 28px; height: 28px; border: 1.5px solid #444; border-radius: 50%; padding: 0; font-size: 14px; }
.user { font-size: 15px; }

/* generic data grid */
table.grid { border-collapse: collapse; width: 100%; table-layout: fixed; }
table.grid thead th { background: var(--blue); color: #fff; font-weight: 700; font-size: 14px; padding: 0 2px; height: 18px; text-align: left; border-right: 1px solid rgba(255,255,255,.5); position: sticky; top: 0; z-index: 1; }
table.grid thead th.sortable { cursor: pointer; }
table.grid thead tr.filters th { background: #fff; padding: 0 2px; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; }
table.grid thead tr.filters input { width: 100%; border: 0; font: 10px var(--font); color: rgba(0,0,0,.88); padding: 2px 3px; outline: none; }
table.grid tbody td { padding: 0 2px; vertical-align: top; font-size: 12px; color: #000; overflow: hidden; }
table.grid tbody tr { background: #fff; }
table.grid tbody tr:nth-child(even) { background: var(--row-alt); }
table.grid tbody tr.selected { background: var(--row-selected); }
table.grid tbody tr:hover { outline: 1px solid #b8cde6; }
td.name a { cursor: pointer; color: var(--link); text-decoration: none; font-size: 12px; }
td.name a:hover { text-decoration: underline; }
input[type=checkbox] { width: 14px; height: 14px; }
.empty-grid th { text-align: center !important; }

/* tasks page */
.tasks-head { display: flex; align-items: center; gap: 12px; padding: 6px 8px; }
.filter-btn { width: 40px; height: 40px; border-radius: 6px; border: 0; background: #eee; font-size: 20px; color: #555; }
.filters-label b { display: block; font-size: 16px; font-weight: 400; line-height: 24.8px; }
.filters-label span { color: rgb(134,142,150); font-size: 12px; line-height: 18.6px; }
.tasks-bar { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 8px; }
.cat-tabs { display: flex; }
.cat-tabs button { background: transparent; border: 1px solid #aaa; border-bottom: 0; border-radius: 5px 5px 0 0; height: 56px; width: 80.5px; padding: 2px 0; font-size: 12px; font-weight: 700; color: #000; line-height: 1.2; }
.cat-tabs button.active { background: var(--tab-active); }
.badge { display: inline-block; background: #f00; color: #fff; border-radius: 50%; font-size: 12px; font-weight: 700; width: 15px; height: 15px; line-height: 15px; text-align: center; margin-left: 4px; }
.bar-right { text-align: center; padding-bottom: 6px; position: relative; }
.edit-btn { background: var(--dark); color: #fff; border: 0; border-radius: 10px; padding: 0 25px; height: 33px; font-size: 15px; font-weight: 700; letter-spacing: .6px; }
.edit-btn:disabled { opacity: .55; cursor: not-allowed; }
.updated { font-size: 12px; color: #555; margin-top: 6px; }
.menu { position: absolute; top: 44px; left: 0; background: #fff; border: 1px solid #bbb; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.2); z-index: 10; min-width: 190px; text-align: left; }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 12px; font-size: 13px; }
.menu button:hover { background: var(--tab-active); }
.tasks-grid-wrap { margin: 0 8px; overflow: auto; max-height: calc(100vh - 170px); }
.pri { display: inline-block; padding: 0 7px; line-height: 20px; border: 1px solid; border-radius: 4px; font-size: 12px; font-weight: 400; }
.pri.URGENT { color: var(--urgent); background: var(--urgent-bg); border-color: #ffa39e; }
.pri.HIGH { color: var(--high); background: var(--high-bg); border-color: #ffbb96; }
.pri.NORMAL { color: #555; background: #f3f3f3; border-color: #bbb; }
.overdue { color: #f00606; }
.pager { padding: 6px 12px; font-size: 12px; color: #555; }

/* search pages */
.search-page { display: flex; gap: 12px; padding: 8px; align-items: flex-start; }
.search-box { display: flex; align-items: center; border: 1px solid #bbb; border-radius: 4px; width: 380px; flex: none; }
.search-box .tag { padding: 8px 10px; background: #f3f3f3; border-right: 1px solid #bbb; }
.search-box input { flex: 1; border: 0; padding: 8px; font: 14px var(--font); outline: none; }
.search-box button { border: 0; background: none; font-size: 16px; padding: 0 8px; }
.search-go { border: 1px solid #bbb; background: #fff; border-radius: 4px; width: 34px; height: 34px; }
.search-results { flex: 1; border: 1px solid #888; border-top: 0; min-height: 22px; }

/* patient profile (values from the real app's computed styles) */
.profile { display: grid; grid-template-columns: 380px 1fr; height: calc(100vh - 40px); }
.engage { border-right: 1px solid #f0f0f0; padding: 0 12px; overflow: auto; }
.engage h2 { font-size: 16px; font-weight: 600; margin: 12px 8px 20px; }
.copilot { background: #fff; border: 1px solid #d9d9d9; border-radius: 8px; padding: 16px; margin: 0 5px; }
.copilot h4 { margin: 0 0 16px; font-size: 12px; font-weight: 600; }
.copilot p { font-size: 14px; line-height: 22px; color: rgba(0,0,0,.88); margin: 0 0 12px; }
.copilot .nocall { background: #f5f5f5; border-radius: 4px; padding: 12px; font-size: 12px; color: rgba(0,0,0,.45); }
.comments-head { display: flex; align-items: center; gap: 8px; margin: 24px 0 14px 2px; font-size: 16px; font-weight: 600; }
.comments-head button { width: 24px; height: 24px; border: 1px solid #d9d9d9; background: #fff; border-radius: 4px; }
.comment-search { display: flex; align-items: center; gap: 6px; background: #f5f5f5; padding: 0 7px; height: 22px; border-radius: 4px; font-size: 14px; margin: 0 8px; }
.comment-search input { flex: 1; border: 0; background: none; font: 14px var(--font); outline: none; }
.comment { padding: 12px 2px; border-bottom: 1px solid #f0f0f0; }
.comment .meta { display: flex; justify-content: space-between; font-size: 13px; color: #8c8c8c; margin-bottom: 6px; }
.comment .body { font-size: 14px; color: #262626; min-height: 40px; }
.comment .actions { margin-top: 10px; color: #6a8fc4; font-size: 13px; }
.comment .actions span { margin-right: 14px; cursor: pointer; }
.main-col { padding: 0 23px 0 9px; overflow: auto; }
.pt-top { display: flex; gap: 52px; align-items: flex-start; padding-top: 11px; }
.pt-top .id-box { display: flex; border: 1px solid #d9d9d9; border-radius: 6px; width: 380px; height: 34px; font-size: 14px; overflow: hidden; flex: none; align-items: center; }
.pt-top .id-box span { padding: 0 11px; background: rgba(0,0,0,.02); border-right: 1px solid #d9d9d9; height: 100%; display: flex; align-items: center; }
.pt-top .id-box div { padding: 0 11px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(0,0,0,.88); }
.mini-grid { border-collapse: collapse; font-size: 12px; margin-top: -11px; }
.mini-grid th { background: var(--blue); color: #fff; padding: 0 4px; height: 18px; font-size: 14px; font-weight: 700; border-right: 1px solid rgba(255,255,255,.6); }
.mini-grid td { border: 1px solid #808080; padding: 0 4px; height: 18px; text-align: center; font-size: 12px; }
.call-btn { margin-left: auto; width: 34px; height: 34px; background: var(--blue); color: #fff; border-radius: 6px; border: 0; }
.sub-tabs { display: flex; align-items: center; gap: 32px; margin: 24px 0 16px; font-size: 14px; height: 22px; }
.sub-tabs a { color: rgba(0,0,0,.88); text-decoration: none; cursor: pointer; padding-bottom: 2px; }
.sub-tabs a.active { color: var(--blue); border-bottom: 2px solid var(--blue); }
.sub-tabs .sp { flex: 1; }
.pill { background: var(--blue); color: #fff; border: 0; border-radius: 4px; height: 24px; padding: 0 7px; font-size: 14px; font-weight: 400; margin-left: 6px; }
.split { display: grid; grid-template-columns: 252px 1fr; gap: 15px; align-items: start; }
.left-col table.grid { border: 1px solid #808080; }
.profile table.grid td { border-right: 1px solid #808080; }
.profile table.grid tbody tr { border-bottom: 0; }
.dx-wrap { height: 135px; overflow: auto; }
.btn-row { display: flex; justify-content: space-between; margin: 8px 0 4px; }
.btn-row button { background: var(--blue); color: #fff; border: 0; border-radius: 4px; height: 24px; padding: 0 7px; font-size: 14px; }
.left-col table.recs thead th { font-size: 12px; height: 12px; }
.left-col table.recs tbody td { height: 23px; vertical-align: middle; }
.rx-wrap { max-height: 375px; overflow: auto; border: 1px solid #808080; }
.rx-wrap table.grid { width: 953px; }
.rx-wrap table.grid tbody td { height: 19.6px; }
.demo { background: #dcdcdc; margin-top: 15px; padding: 5px; height: 136px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 3px 14px; }
.demo .f { width: auto; }
.demo label { color: var(--blue); font-weight: 700; font-size: 15px; display: block; line-height: 18px; }
.demo .val { background: #ccc; border: 1px solid var(--blue); border-radius: 5px; padding: 5px; height: 35px; font-size: 13.33px; font-weight: 700; color: #000; min-width: 126px; display: flex; align-items: center; }
.demo b { font-size: 15px; display: block; line-height: 32px; }
.demo select { height: 35px; width: 90px; font: 700 13.33px var(--font); border: 1px solid var(--blue); border-radius: 5px; background: #fff; }
.demo .row2 { display: flex; width: 100%; gap: 14px; margin-top: 4px; }
.demo .row2 label { min-width: 126px; }
.placeholder { padding: 60px; text-align: center; color: var(--muted); font-size: 16px; border: 2px dashed #ccc; border-radius: 8px; margin-top: 20px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 8px; padding: 20px; width: 460px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.modal h3 { margin: 0 0 14px; }
.modal label { display: block; margin: 10px 0 4px; font-weight: 700; font-size: 12px; }
.modal input, .modal select, .modal textarea { width: 100%; padding: 7px; font: 14px var(--font); border: 1px solid #bbb; border-radius: 4px; }
.modal .actions { margin-top: 16px; text-align: right; }
.modal .actions button { padding: 7px 16px; border-radius: 4px; border: 1px solid #aaa; background: #fff; margin-left: 8px; }
.modal .actions .primary { background: var(--blue-dark); color: #fff; border-color: var(--blue-dark); }

/* profile sub-tab row: no wrapping */
.sub-tabs a, .pill { white-space: nowrap; }
.sub-tabs { gap: 28px; }
.sub-tabs .tabs-scroll { display: flex; gap: 28px; overflow: hidden; flex: 1; }

/* ---- Copilot panel (values from the live app's computed styles) ---- */
.engage { padding: 0 12px; }
.cp-card { border: 1px solid #d9d9d9; border-radius: 8px; background: #fff; margin: 0 5px 8px; overflow: hidden; }
.cp-card.orange { border: 2px solid rgb(243,131,34); }
.cp-head { display: flex; justify-content: space-between; align-items: center; padding: 16px; font-size: 12px; font-weight: 600; color: rgba(0,0,0,.88); border-bottom: 1px solid #d9d9d9; cursor: pointer; height: 52px; }
.cp-card.collapsed .cp-head, .cp-head:only-child { border-bottom: 0; }
.cp-body { padding: 12px 16px; }
.cp-card.plain .cp-body p { font-size: 14px; line-height: 22px; color: rgba(0,0,0,.88); margin: 0 0 12px; }
.cp-nocall { background: #f5f5f5; border-radius: 4px; padding: 12px; font-size: 12px; color: rgba(0,0,0,.45); }
.cp-muted { font-size: 12px; color: rgba(0,0,0,.45); }
.cp-script { font-size: 12px; line-height: 19px; color: rgba(0,0,0,.88); margin: 2px 0 14px; }
.cp-box { border: 1px solid #d9d9d9; border-radius: 6px; padding: 12px; margin-bottom: 12px; }
.cp-val { font-size: 14px; color: rgba(0,0,0,.88); margin-top: 4px; }
.cp-primary { display: block; width: 100%; height: 32px; margin-top: 12px; background: #5c99cf; color: #fff; border: 1px solid transparent; border-radius: 6px; font-size: 14px; }
.cp-outline { display: block; width: 100%; height: 32px; margin: 8px 0 0; background: #fff; color: rgba(0,0,0,.88); border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; }
.cp-sec { display: flex; justify-content: space-between; align-items: center; background: #f5f5f5; padding: 12px 16px; font-size: 12px; font-weight: 600; cursor: default; }
.cp-sec[data-cp] { cursor: pointer; }
.cp-scroll { max-height: 200px; overflow-y: auto; font-size: 13px; line-height: 17px; color: #333; }
.cp-scroll .tl { margin-bottom: 8px; } .cp-scroll .tl.live { font-style: italic; color: #666; }
.cp-sw-wrap { display: flex; align-items: center; gap: 8px; font-weight: 400; color: rgba(0,0,0,.65); }
.cp-switch { width: 44px; height: 22px; border-radius: 100px; background: rgba(0,0,0,.25); position: relative; cursor: pointer; display: inline-block; }
.cp-switch.on { background: #1677ff; }
.cp-switch i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.cp-switch.on i { left: 24px; }
.cp-empty { padding: 12px 16px; font-size: 12px; color: #8c8c8c; }
.cp-obsgroup { padding: 8px 16px 4px; font-size: 11px; color: #8c8c8c; }
.cp-obs { display: flex; justify-content: space-between; align-items: center; padding: 6px 16px; font-size: 12px; color: #333; background: #fff; }
.cp-obs.pending .act { visibility: hidden; }
.cp-obs.pending:hover { background: #eef6fd; }
.cp-obs.pending:hover .act { visibility: visible; }
.cp-obs .act button { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid; background: #fff; margin-left: 4px; font-size: 11px; padding: 0; line-height: 1; }
.cp-obs .rej { color: #e5484d; border-color: #e5484d; } .cp-obs .app { color: #1677ff; border-color: #1677ff; }
.cp-enh { border: 1px solid #d9d9d9; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #333; line-height: 17px; }
.cp-select, .cp-input { display: block; width: 100%; height: 36px; border: 1px solid #d9d9d9; border-radius: 8px; padding: 8px 10px; font: 14px var(--font); margin-bottom: 8px; background: #fff; }
.cp-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 10px; }
.cp-chip { border: 1px solid #d9d9d9; border-radius: 4px; background: #fafafa; padding: 2px 8px; font-size: 12px; color: rgba(0,0,0,.88); }
.cp-chip a { cursor: pointer; color: #999; margin-left: 6px; }
.cp-check { display: flex; gap: 6px; font-size: 13px; line-height: 17px; margin-bottom: 8px; }
.cp-warn { background: #fff2f0; border: 1px solid #ffccc7; border-radius: 6px; padding: 8px; font-size: 13px; color: #333; margin-bottom: 4px; }
.cp-other-title { font-size: 16px; font-weight: 600; margin: 18px 12px 0; } .cp-other-sub { font-size: 14px; color: rgba(0,0,0,.45); margin: 4px 12px 14px; }
.cp-purple { position: relative; background: rgb(243,239,252); border-radius: 10px; padding: 16px; margin: 0 12px 16px; }
.cp-purple .nm { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.cp-purple .nm i { width: 8px; height: 8px; border-radius: 50%; background: rgb(155,127,212); display: inline-block; }
.cp-purple p { font-size: 13px; line-height: 20px; color: rgba(0,0,0,.45); width: 215px; margin: 12px 0 0 16px; }
.cp-purple .spark { position: absolute; right: 16px; top: 18px; }
.cp-switcher { position: fixed; right: 12px; bottom: 12px; background: #333; color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12px; z-index: 40; }
.cp-switcher select { margin-left: 6px; }

/* ---- profile fidelity pass: collapse, hover, resizable/reorderable columns, wider header ---- */
.profile.collapsed { grid-template-columns: 1fr; }
.profile.collapsed .engage { display: none; }
.profile.collapsed .main-col { padding-left: 8px; }
.pt-top { gap: 8px; align-items: center; padding-top: 4px; }
.pt-top .unfold { background: none; border: 0; color: #555; padding: 0 2px; cursor: pointer; display: flex; }
.pt-top .id-box { width: 330px; height: 28px; border-radius: 4px; flex: none; }
.pt-top .id-box div { font-size: 13px; }
.pt-top .id-box em { font-style: normal; color: #888; padding: 0 6px; font-size: 13px; }
.pt-top .srch { width: 30px; height: 28px; border: 1px solid #d9d9d9; background: #fff; border-radius: 4px; font-size: 13px; }
.mini-wrap { flex: 1; min-width: 0; overflow-x: auto; border-bottom: 5px solid transparent; }
.mini-grid { margin-top: 0; table-layout: fixed; }
.mini-grid th, .mini-grid td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-btn { margin-left: 0; flex: none; }
.profile ::-webkit-scrollbar { width: 9px; height: 9px; }
.profile ::-webkit-scrollbar-thumb { background: #5c99cf; border-radius: 5px; }
.profile ::-webkit-scrollbar-track { background: #f3f3f3; }
.split { grid-template-columns: 291px 1fr; gap: 12px; }
.split.wide { grid-template-columns: 372px 1fr; }
.dx-wrap { height: 152px; border: 1px solid #808080; }
.left-col table.grid { border: 0; }
.left-col table.dx { table-layout: fixed; }
.dx-wrap thead th { position: sticky; top: 0; }
.btn-row { align-items: center; }
.btn-row .kebab { color: #666; margin-right: auto; margin-left: 8px; }
.rec-wrap { height: 170px; overflow: auto; border: 1px solid #808080; }
.rec-links { float: right; font-size: 8px; font-weight: 400; line-height: 8px; }
.rec-links a { text-decoration: underline; margin-left: 4px; }
table.recs tbody tr { height: 20px; }
.rx-wrap { border: 1px solid #808080; border-radius: 4px; max-height: 420px; overflow: auto; width: 100%; min-width: 0; }
.rx-wrap table.grid { width: auto; table-layout: fixed; }
table.rx thead th { position: sticky; top: 0; white-space: nowrap; font-size: 12px; padding: 0 3px; }
table.rx thead tr.filters th { top: 18px; }
table.rx th .t { cursor: pointer; }
table.rx th .sorti { opacity: 0; margin-left: 3px; font-size: 11px; }
table.rx th:hover .sorti, table.rx th.sorted .sorti { opacity: 1; }
table.rx th .tools { position: absolute; right: 6px; top: 0; opacity: .75; letter-spacing: -2px; font-style: normal; }
table.rx th .tools i { font-style: normal; cursor: pointer; margin-left: 4px; }
table.rx th .tools .grip { cursor: grab; }
table.rx th .rxtools b { font-weight: 400; margin-left: 4px; font-size: 11px; }
table.rx th .rz { position: absolute; right: 0; top: 0; bottom: 0; width: 6px; cursor: col-resize; }
table.rx th { position: sticky; }
table.rx th.drop-l { box-shadow: inset 3px 0 0 #1677ff; }
table.rx th.drop-r { box-shadow: inset -3px 0 0 #1677ff; }
table.rx tbody td { border-bottom: 1px solid #d0d0d0; height: 19px; }
table.rx tbody tr:hover, table.dx tbody tr:hover, table.recs tbody tr:hover { outline: none; background: #fff3c4; }
table.rx td .trash { float: right; margin-right: 6px; color: #444; }
.sub-tabs { gap: 20px; margin: 14px 0 12px; }
.sub-tabs .tabs-scroll { gap: 30px; }
.sub-tabs .more { color: #666; margin-left: -8px; }
.demo { height: auto; min-height: 136px; gap: 4px 14px; margin-top: 12px; }
.demo .f { min-width: 110px; }
.demo b.sm { font-size: 14px; color: #555; line-height: 26px; }

/* ---- second pass ---- */
.rx-wrap table.grid { min-width: 100%; }
.dx thead th, table.recs thead th { font-size: 12px; }
.mini-grid th { font-size: 12px; }
.demo { display: block; }
.demo .drow { display: flex; flex-wrap: nowrap; gap: 4px 14px; margin-bottom: 4px; }
.demo .drow .f { flex: none; }
.demo .drow:nth-child(2) .f { min-width: 126px; }
.dx-wrap tbody td { font-size: 12px; }

/* ---- Rx detail panel ---- */
table.rx tbody tr.sel { background: #fff3c4; }
.rxd { margin-top: 12px; border: 1px solid #808080; border-radius: 4px; padding: 8px 8px 10px; background: #fff; }
.rxd .al { color: var(--blue); font-weight: 700; font-size: 13px; line-height: 17px; }
.rxd-head { display: flex; align-items: center; gap: 28px; font-size: 13px; margin-bottom: 8px; }
.rxd-head .nm { font-size: 13px; }
.rxd-head em { font-style: normal; color: var(--blue); font-weight: 700; }
.rxd-head strong { font-weight: 700; }
.rxd-head .price { margin-left: auto; margin-right: 12px; background: #666; color: #fff; border: 0; border-radius: 4px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.rxd-grid { display: grid; grid-template-columns: 240px 235px 230px 230px 1fr; gap: 10px; align-items: start; }
.rxd .status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 2px; }
.rxd .status .al { width: 55px; }
.rxd .status label { display: flex; align-items: center; gap: 3px; }
.rxd .sig { width: 100%; height: 22px; border: 1px solid var(--blue); border-radius: 4px; margin: 2px 0 6px; padding: 0 4px; font: 13px var(--font); }
.rxd .rc { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 4px 0; cursor: pointer; }
.rxd .rc input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }
.rxd .rc i { width: 14px; height: 14px; border: 1px solid var(--blue); border-radius: 50%; display: inline-block; flex: none; position: relative; background: #fff; }
.rxd .rc input:checked + i::after { content: "\2713"; position: absolute; inset: -2px 0 0 2px; font-size: 11px; font-style: normal; color: var(--blue); }
.rxd .rc .oth { flex: 1; height: 20px; border: 1px solid #ccc; border-radius: 4px; background: #d7d7d7; padding: 0 6px; font: 12px var(--font); }
.rxd .rc .oth:not(:disabled) { background: #fff; }
.rxd .rsn { margin: 8px 0 3px; }
.rxd .reason { width: 100%; height: 24px; border: 1px solid #d9d9d9; border-radius: 4px; color: #999; background: #fff; font: 13px var(--font); }
.rxd .boxh { font-size: 13px; margin-bottom: 2px; }
.rxd .box { border: 1px solid #808080; border-radius: 3px; padding: 4px 6px; min-height: 200px; }
.rxd .av { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.rxd .csz { display: grid; grid-template-columns: 1fr 0.8fr 1fr; gap: 4px; }
.rxd .notes { width: 100%; height: 100px; border: 1px solid var(--blue); border-radius: 8px; padding: 6px; font: 13px var(--font); resize: vertical; margin-bottom: 4px; display: block; }
.rxd .refill { margin-top: 12px; }
.rxd .refill .h { font-size: 14px; margin-bottom: 4px; padding-left: 6px; }
.rxd .refill-wrap { max-height: 130px; overflow: auto; border: 1px solid #808080; }
.rxd .refill-wrap thead th { font-size: 12px; }
.rxd .refill-wrap td a { text-decoration: underline; color: #000; cursor: pointer; }
.rxd .refill-wrap td { font-size: 12px; border-bottom: 1px solid #d0d0d0; }

/* ---- Story tab ---- */
.story { padding-bottom: 24px; }
.st-h1 { font-size: 24px; font-weight: 400; color: rgba(0,0,0,.88); margin: 14px 0 8px; }
.st-h2 { font-size: 20px; font-weight: 400; color: #333; margin: 26px 0 8px; }
.stabs { display: flex; }
.stab { height: 30px; padding: 0 25px; border: 1px solid #9b9b9b; border-bottom: 0; border-radius: 10px 10px 0 0; background: #fff; color: #4d4d4d; font: 13.33px var(--font); cursor: pointer; }
.stab.on { background: #d9d7d9; color: #000; }
.ttabs { display: flex; }
.ttab { height: 25px; flex: 0 0 25%; border: 1px solid #9b9b9b; border-bottom: 0; border-radius: 5px 5px 0 0; background: #fff; color: #000; font: 700 12px var(--font); cursor: pointer; }
.ttab.on { background: rgba(173,216,230,.5); }
.st-grid { border: 1px solid #9b9b9b; max-height: 250px; overflow: auto; background: #fff; }
.st-grid.tl { max-height: 430px; }
table.st { table-layout: fixed; min-width: 100%; }
table.st thead th { text-align: center; font-size: 12px; height: 17px; padding: 0 3px; border-right: 1px solid rgba(255,255,255,.5); position: sticky; top: 0; z-index: 2; }
table.st thead tr.filters th { top: 17px; padding: 1px; background: #fff; border: 1px solid #9b9b9b; z-index: 2; }
table.st thead tr.filters th.grayh { background: #e6e6e6; }
table.st thead tr.filters input { width: 100%; height: 25px; border: 1px solid #ddd; border-radius: 5px; padding: 5px; font: 13.33px var(--font); color: #000; text-align: center; background: #fff; }
table.st thead tr.filters input::placeholder { color: #aaa; }
table.st th.sortable { cursor: pointer; }
table.st tbody td { text-align: center; font-size: 12px; color: #333; padding: 1px; vertical-align: middle; border-right: 1px solid #9b9b9b; }
table.st tbody td.notecell { white-space: normal; }
table.st tbody td.left, table.st tbody td.notecell.left { text-align: left; padding: 2px 4px; }
table.st tbody tr:hover { outline: none; background: #fff3c4; }
table.st td.note1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; padding: 1px 6px; cursor: default; }
table.st .rxi { color: #4a7fb3; font-weight: 700; font-size: 13px; }
table.st .del { background: none; border: 0; color: #111; cursor: pointer; padding: 2px; }
.st-total { text-align: right; font-size: 11px; color: #333; padding: 6px 8px 0; }
.st-total.left { text-align: left; padding-left: 2px; }
.st-total .more { font-weight: 700; color: #111; cursor: pointer; }
.st-pager { text-align: right; font-size: 12px; padding: 8px 8px 0; color: #555; }
.st-pager .pg { display: inline-block; min-width: 24px; height: 22px; line-height: 20px; text-align: center; margin-left: 4px; border: 1px solid transparent; border-radius: 4px; }
.st-pager .pg.on { border-color: #5c99cf; color: #1677ff; background: #fff; }
.note-pop { position: fixed; z-index: 60; width: 400px; background: #fff; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.25); padding: 12px; }
.np-t { font-size: 16px; font-weight: 700; color: #5c99cf; margin-bottom: 8px; }
.np-b { max-height: 200px; overflow: auto; font-size: 12px; font-weight: 700; color: #000; line-height: 17px; border: 1px solid #5c99cf; border-radius: 8px; padding: 6px 8px; }
.note-pop i { position: absolute; bottom: -6px; right: 30px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); box-shadow: 3px 3px 4px rgba(0,0,0,.1); }
