/* Stable MediCore recovery patch: no overlays over the app and no raw inline scripts. */
.mc-tools-panel{position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:2147483000;display:none;align-items:center;justify-content:center;padding:18px;font-family:Inter,Segoe UI,Arial,sans-serif}.mc-tools-panel.open{display:flex}.mc-tools-card{width:min(720px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:18px;box-shadow:0 24px 80px rgba(15,23,42,.35);border:1px solid #e5e7eb}.mc-tools-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid #e5e7eb;background:linear-gradient(135deg,#f8fafc,#eef2ff)}.mc-tools-title{font-weight:900;font-size:18px;color:#111827}.mc-tools-sub{font-size:12px;color:#64748b;margin-top:2px}.mc-tools-close{border:0;background:#111827;color:#fff;border-radius:10px;padding:7px 10px;cursor:pointer}.mc-tools-body{padding:16px;display:grid;gap:10px}.mc-tool-btn{width:100%;border:1px solid #dbe4f0;background:#fff;border-radius:12px;padding:13px 14px;text-align:left;cursor:pointer;font-weight:800;color:#111827;box-shadow:0 1px 2px rgba(15,23,42,.04)}.mc-tool-btn:hover{background:#f8fafc;border-color:#94a3b8}.mc-tool-danger{border-color:#fecaca;background:#fff7f7;color:#991b1b}.mc-tool-note{font-size:12px;color:#64748b;font-weight:500;margin-top:4px}.mc-sidebar-tool-button{display:flex!important;align-items:center!important;gap:8px!important;width:100%!important;border:0!important;background:transparent!important;color:inherit!important;cursor:pointer!important;padding:10px 12px!important;border-radius:12px!important;font:inherit!important}.mc-sidebar-tool-button:hover{background:rgba(91,75,138,.10)!important}.mc-mini-modal{position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:2147483100;display:flex;align-items:center;justify-content:center;padding:16px}.mc-mini-card{background:#fff;width:min(980px,96vw);max-height:90vh;overflow:auto;border-radius:16px;border:1px solid #e5e7eb;box-shadow:0 24px 80px rgba(15,23,42,.35)}.mc-mini-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid #e5e7eb;background:#f8fafc}.mc-mini-body{padding:14px}.mc-input{width:100%;border:1px solid #cbd5e1;border-radius:10px;padding:9px 10px;margin:4px 0 10px}.mc-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;border-bottom:1px solid #eef2f7;padding:8px 0}.mc-action{border:1px solid #cbd5e1;background:#fff;border-radius:9px;padding:7px 10px;cursor:pointer}.mc-action.primary{background:#2563eb;color:#fff;border-color:#2563eb}.mc-action.danger{background:#fee2e2;color:#991b1b;border-color:#fecaca}.mc-hidden-fix{display:none!important;pointer-events:none!important}@media(max-width:700px){.mc-tools-card{border-radius:12px}.mc-tools-body{padding:12px}.mc-row{grid-template-columns:1fr}.mc-sidebar-tool-button{justify-content:center!important;font-size:12px!important}}
.mc-workstation-tools-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;border:1px solid #c7d2fe!important;background:linear-gradient(180deg,#eef2ff,#e0e7ff)!important;color:#3730a3!important;border-radius:10px!important;padding:8px 12px!important;font-weight:800!important;cursor:pointer!important;min-height:36px!important;box-shadow:0 1px 2px rgba(15,23,42,.06)!important}.mc-workstation-tools-button:hover{background:#dbeafe!important;border-color:#818cf8!important}.mc-ws-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;border:1px solid #e5e7eb;border-radius:12px;padding:9px;margin-bottom:8px;background:#fff}.mc-ws-row-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.mc-ws-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}@media(max-width:700px){.mc-ws-row{grid-template-columns:1fr}.mc-ws-row-actions{justify-content:stretch}.mc-ws-row-actions .mc-action{flex:1}.mc-workstation-tools-button{width:100%!important}}

.mc-user-settings-shortcuts{margin-top:12px;padding:12px;border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc;position:relative;z-index:5}.mc-user-shortcuts-title{font-weight:900;color:#111827;margin-bottom:2px}.mc-user-shortcuts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}.mc-user-shortcut-btn{border:1px solid #cbd5e1;background:#fff;color:#111827;border-radius:10px;padding:8px 10px;font-weight:800;cursor:pointer;text-align:center}.mc-user-shortcut-btn:hover{background:#eef2ff;border-color:#818cf8;color:#3730a3}@media(max-width:700px){.mc-user-shortcuts-grid{grid-template-columns:1fr}.mc-user-shortcut-btn{width:100%}}


/* Workstation: replace old quick buttons with patient test search */
.mc-ws-quick-hidden{display:none!important;visibility:hidden!important;pointer-events:none!important}.mc-workstation-test-search{width:100%;display:block!important;background:#ffffff;border:1px solid #dbe4f0;border-radius:14px;padding:10px 12px;margin:8px 0 12px;box-shadow:0 1px 3px rgba(15,23,42,.06);position:relative;z-index:4}.mc-test-search-label{display:block;font-size:12px;font-weight:900;color:#334155;margin-bottom:6px}.mc-test-search-row{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;gap:8px;align-items:center}.mc-test-search-input{width:100%;border:1px solid #cbd5e1;border-radius:10px;padding:10px 12px;font-size:14px;outline:none}.mc-test-search-input:focus{border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.14)}.mc-test-search-add,.mc-test-search-pick{border:1px solid #c7d2fe;background:#eef2ff;color:#3730a3;border-radius:10px;padding:10px 12px;font-weight:900;cursor:pointer;white-space:nowrap}.mc-test-search-add:hover,.mc-test-search-pick:hover{background:#e0e7ff}.mc-test-search-status{font-size:12px;color:#047857;margin-top:6px;min-height:14px}.mc-test-search-status.error{color:#b91c1c}@media(max-width:700px){.mc-test-search-row{grid-template-columns:1fr}.mc-test-search-add,.mc-test-search-pick{width:100%}}

/* User quick buttons should visually match Workstation quick buttons */
.mc-user-shortcuts-grid{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-top:10px!important}
.mc-user-shortcut-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;border:1px solid #c7d2fe!important;background:linear-gradient(180deg,#eef2ff,#e0e7ff)!important;color:#3730a3!important;border-radius:10px!important;padding:8px 12px!important;font-weight:900!important;cursor:pointer!important;min-height:36px!important;box-shadow:0 1px 2px rgba(15,23,42,.06)!important;white-space:nowrap!important;text-align:center!important}
.mc-user-shortcut-btn:hover{background:#dbeafe!important;border-color:#818cf8!important;color:#312e81!important;transform:translateY(-1px)!important}
@media(max-width:700px){.mc-user-shortcuts-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}.mc-user-shortcut-btn{width:100%!important;white-space:normal!important}}

/* Keep the Workstation search as one integrated toolbar above Pick Tests / Tests / Packages */
.mc-workstation-test-search{margin:8px 0 10px!important;background:#fff!important;border:1px solid #dbe4f0!important;border-radius:12px!important;padding:9px 10px!important;box-shadow:none!important}
.mc-test-search-label{font-size:12px!important;font-weight:900!important;margin-bottom:5px!important;color:#334155!important}
.mc-test-search-row{display:grid!important;grid-template-columns:minmax(220px,1fr) auto!important;gap:8px!important;align-items:center!important}

/* Workstation search: filter active tests from Tests section internally */
.mc-test-search-results{margin-top:8px;border:1px solid #e2e8f0;border-radius:10px;max-height:260px;overflow:auto;background:#fff;display:block!important}
.mc-test-search-count{position:sticky;top:0;background:#f8fafc;color:#475569;font-size:11px;font-weight:900;padding:7px 10px;border-bottom:1px solid #e2e8f0;z-index:1}
.mc-test-search-suggestion{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;text-align:left;border:0;border-bottom:1px solid #f1f5f9;background:#fff;padding:8px 10px;cursor:pointer;color:#0f172a}
.mc-test-search-suggestion:hover,.mc-test-search-suggestion:focus{background:#eef2ff;outline:none}
.mc-test-search-suggestion-name{font-weight:800;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mc-test-search-suggestion-meta{font-size:10px;color:#64748b;white-space:nowrap}
.mc-test-search-empty{font-size:12px;color:#b91c1c;padding:10px;font-weight:800}
@media(max-width:700px){.mc-test-search-suggestion{grid-template-columns:1fr}.mc-test-search-suggestion-meta{white-space:normal}.mc-test-search-results{max-height:220px}}

/* Hide search result count/title; results only appear while searching */
.mc-test-search-count{display:none!important}

/* Workstation master Tests search upgrade */
.mc-workstation-test-search{z-index:50!important;overflow:visible!important}.mc-test-search-input{font-size:13px!important}.mc-test-search-results{display:none;box-shadow:0 16px 40px rgba(15,23,42,.16);max-height:320px!important}.mc-test-search-heading{font-size:11px;font-weight:900;color:#475569;background:#f8fafc;border-bottom:1px solid #e2e8f0;padding:7px 10px;position:sticky;top:0;z-index:2}.mc-test-search-suggestion{min-height:42px}.mc-test-search-suggestion.active,.mc-test-search-suggestion:hover,.mc-test-search-suggestion:focus{background:#eef2ff!important;outline:none}.mc-test-search-suggestion-main{display:flex;align-items:center;gap:8px;min-width:0}.mc-test-search-icon{width:22px;height:22px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;background:#f1f5f9;flex:0 0 22px}.mc-test-search-suggestion-name{display:block!important}.mc-test-search-suggestion-meta{max-width:280px;overflow:hidden;text-overflow:ellipsis}.mc-test-search-empty{background:#fff7ed;color:#9a3412!important}
@media(max-width:700px){.mc-test-search-results{max-height:280px!important}.mc-test-search-suggestion-meta{max-width:100%;white-space:normal!important}}

/* Workstation Tests picker mode: replaces the large search row with a Tests box. */
.mc-test-picker-mode{max-width:100%!important}
.mc-test-picker-row{display:flex!important;grid-template-columns:none!important;gap:10px!important;align-items:center!important}
.mc-test-picker-button,.mc-test-package-picker-button{border:1px solid #9aa9e8!important;background:linear-gradient(180deg,#eef2ff,#dbe4ff)!important;color:#312e81!important;border-radius:12px!important;padding:11px 16px!important;font-weight:950!important;cursor:pointer!important;min-width:170px!important;display:inline-flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;box-shadow:0 1px 2px rgba(15,23,42,.08)!important}
.mc-test-picker-button small{display:block!important;font-size:10px!important;font-weight:800!important;color:#64748b!important;margin-left:6px!important;white-space:nowrap!important}
.mc-test-package-picker-button{background:linear-gradient(180deg,#fff7ed,#fed7aa)!important;color:#7c2d12!important;border-color:#fdba74!important;min-width:140px!important;justify-content:center!important}
.mc-test-picker-button:hover,.mc-test-picker-button[aria-expanded="true"]{background:linear-gradient(180deg,#dbe4ff,#c7d2fe)!important;border-color:#6366f1!important;box-shadow:0 0 0 3px rgba(99,102,241,.14)!important}
.mc-test-package-picker-button:hover{background:linear-gradient(180deg,#fed7aa,#fdba74)!important}
.mc-test-search-panel{display:none!important;position:absolute!important;left:12px!important;top:78px!important;width:min(520px,calc(100vw - 48px))!important;background:#fff!important;border:1px solid #a78bfa!important;border-radius:12px!important;box-shadow:0 22px 55px rgba(15,23,42,.22)!important;z-index:9999!important;overflow:hidden!important}
.mc-test-search-panel.open{display:block!important}
.mc-test-search-panel-head{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:8px!important;align-items:center!important;padding:10px!important;border-bottom:1px solid #e2e8f0!important;background:#fff!important}
.mc-test-search-mini-icon{color:#64748b!important;font-size:18px!important;line-height:1!important}
.mc-test-search-close{border:0!important;background:#fff!important;color:#334155!important;font-size:22px!important;line-height:1!important;cursor:pointer!important;padding:4px 8px!important;border-radius:8px!important}
.mc-test-search-close:hover{background:#f1f5f9!important}
.mc-test-picker-mode .mc-test-search-input{height:38px!important;padding:8px 10px!important;border-radius:8px!important;font-size:13px!important}
.mc-test-picker-mode .mc-test-search-results{display:block!important;border:0!important;border-radius:0!important;margin-top:0!important;max-height:410px!important;box-shadow:none!important}
.mc-test-picker-mode .mc-test-search-suggestion{padding:10px 12px!important;min-height:48px!important;border-bottom:1px solid #ede9fe!important}
@media(max-width:700px){.mc-test-picker-row{flex-direction:column!important;align-items:stretch!important}.mc-test-picker-button,.mc-test-package-picker-button{width:100%!important;min-width:0!important}.mc-test-search-panel{left:8px!important;right:8px!important;top:118px!important;width:auto!important}}

/* Workstation Tests picker: checkbox multi-select only, no Packages button in the top box */
.mc-test-picker-row{display:block!important}
.mc-test-picker-button{width:min(360px,100%)!important;justify-content:space-between!important}
.mc-workstation-test-search .mc-test-package-picker-button{display:none!important}
.mc-test-check-row{cursor:pointer!important;user-select:none!important}
.mc-test-check-row .mc-test-check{width:18px!important;height:18px!important;accent-color:#2563eb!important;flex:0 0 18px!important;margin:0 8px 0 0!important}
.mc-test-check-row.selected{background:#eef2ff!important}
.mc-test-search-footer{border-top:1px solid #e2e8f0!important;background:#f8fafc!important;padding:10px!important;position:sticky!important;bottom:0!important;z-index:3!important}
.mc-test-add-selected{width:100%!important;border:0!important;border-radius:10px!important;background:linear-gradient(180deg,#22c55e,#16a34a)!important;color:#fff!important;font-weight:950!important;padding:11px 14px!important;cursor:pointer!important;box-shadow:0 2px 5px rgba(22,163,74,.22)!important}
.mc-test-add-selected:disabled{background:#cbd5e1!important;color:#64748b!important;cursor:not-allowed!important;box-shadow:none!important}
.mc-test-search-panel{top:72px!important}
