/* Common interaction and utility-page styles; no report columns or data are hidden. */
:root { --ui-muted:#526b7a; --ui-accent:#217991; }
body,button,input,select,textarea { font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei UI","Microsoft YaHei","PingFang SC","Noto Sans CJK SC",sans-serif; }
button,input,select { font-size:inherit; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible { outline:2px solid var(--ui-accent); outline-offset:3px; }
button { touch-action:manipulation; }
button[aria-busy=true] { cursor:wait; }
.utility-page { font-size:13px; line-height:1.5; }
.utility-page #scrollArea { scrollbar-gutter:stable; }
.utility-page #scrollInner { max-width:1320px; padding:24px 24px 40px; }
.utility-page .hero { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:0 0 18px; margin:0; background:none; color:var(--ink); }
.utility-page .hero h1 { font-size:22px; line-height:1.4; font-weight:600; }
.utility-page .hero .sub { color:var(--ui-muted); margin:4px 0 0; }
.utility-page .hero > .sub { flex-basis:100%; }
.utility-mark { display:grid; place-items:center; flex:none; width:42px; height:42px; border-radius:9px; background:var(--ink); color:white; font-size:18px; font-weight:600; }
.utility-page .source-label { color:var(--ui-muted); background:#eaf2f5; border:1px solid var(--line2); }
.utility-page .app-nav { margin:0 0 20px; gap:8px; padding:8px; border:1px solid var(--line2); }
.utility-page .app-nav a { text-decoration:none; padding:8px 10px; border-radius:5px; color:var(--ui-muted); }
.utility-page .app-nav a:hover { background:#f0f6f8; color:var(--ui-accent); }
.utility-page .app-nav a[aria-current=page] { background:#e8f3f7; color:var(--ui-accent); font-weight:600; }
.utility-page .app-nav span { padding:0 6px; }
.utility-page .sec { border-color:var(--line2); border-radius:10px; }
.utility-page .sec-head { padding:13px 16px; }
.utility-page .sec-title { font-size:15px; font-weight:600; }
.utility-page .sec-body { padding:16px; }
.utility-page :is(.fbtn,.lbtn) { min-height:36px; border:1px solid var(--line2); border-radius:6px; padding:7px 12px; color:var(--ui-accent); background:#fff; font-size:13px; }
.utility-page :is(.fbtn,.lbtn):hover:not(:disabled) { background:#edf5f8; border-color:#90becb; }
.utility-page .query-primary,.utility-page .stack-form button[type=submit] { color:white; background:#20404f; border-color:#20404f; }
.utility-page .query-primary:hover,.utility-page .stack-form button[type=submit]:hover { color:white; background:#2d586c; }
.utility-page .stack-form { max-width:560px; gap:12px; }
.utility-page .stack-form .finput { min-height:40px; font-size:14px; }
.utility-page .checkbox-field { display:flex; align-items:center; gap:8px; min-height:36px; }
.utility-page input[type=checkbox] { width:16px; height:16px; margin:0; accent-color:var(--ui-accent); }
.utility-page .stack-form input[readonly] { background:#f1f5f7; color:var(--ui-muted); }
.utility-page .table-scroll { max-width:100%; overflow:auto; scrollbar-width:thin; scrollbar-color:#9eb5c2 #f1f5f7; }
.utility-page .table-scroll::-webkit-scrollbar { display:block; height:9px; width:9px; }
.utility-page .table-scroll::-webkit-scrollbar-thumb { background:#9eb5c2; border-radius:5px; }
.utility-page table { font-size:13px; font-variant-numeric:tabular-nums; }
.utility-page th { color:var(--ui-muted); font-size:12px; }
.utility-page :is(th,td) { padding:10px 12px; }
.utility-page tbody tr:hover { background:#f4f8fa; }
.utility-page .result-note,.utility-page .patient-id { color:var(--ui-muted); font-size:12px; }
.form-status,#accountStatus { min-height:1.5em; margin:10px 0 0; overflow-wrap:anywhere; }
.form-status:empty,#accountStatus:empty { margin-top:0; }
.login-screen #scrollInner { max-width:488px; padding-top:clamp(32px,10vh,96px); }
.login-screen .hero { padding:0 0 24px; }
.login-screen .hero h1 { font-size:20px; }
.login-screen .narrow { width:100%; margin:0; box-shadow:0 8px 32px #20384308; }
.login-screen .sec-head { padding:20px 24px 0; border:0; }
.login-screen .sec-title { font-size:18px; }
.login-screen .sec-body { padding:20px 24px 24px; }
.login-screen .stack-form { gap:8px; }
.login-screen .stack-form > label:not(:first-child) { margin-top:8px; }
.login-screen button[type=submit] { margin-top:12px; min-height:42px; }
.password-field { position:relative; }
.password-field .finput { padding-right:88px; }
.password-toggle { position:absolute; right:4px; top:3px; bottom:3px; border:0; border-radius:4px; background:transparent; color:var(--ui-accent); padding:0 9px; font-size:12px; }
.password-toggle:hover { background:#edf5f8; }
.form-hint { color:#8a580d; font-size:12px; margin:0; }
.workbench-shell .account-links a,.workbench-shell .account-links button { padding:6px 2px; }
.workbench-shell .tab[aria-pressed=true] { color:var(--accent); }
.workbench-shell .wb-link:hover { text-decoration:underline; text-underline-offset:3px; }
.workbench-shell .sheet-head h2 { min-width:0; overflow-wrap:anywhere; }
.workbench-shell .sheet-head .lbtn { flex:none; }
.workbench-shell #patientSheet { overscroll-behavior:contain; }
.workbench-shell .wb-pager { flex-wrap:wrap; }
@media(max-width:760px) {
  .workbench-shell .account-links { flex-wrap:wrap; justify-content:flex-end; }
  .workbench-shell .account-links a:first-child { display:inline-flex; }
  .workbench-shell .topbar-tools { min-width:0; }
  .workbench-shell .workbench-topbar { align-items:flex-start; }
  .workbench-shell .tab,.workbench-shell .fbtn,.workbench-shell .lbtn,.workbench-shell .sbtn { min-height:36px; }
  .workbench-shell .account-links a,.workbench-shell .account-links button { min-height:32px; display:inline-flex; align-items:center; }
  .workbench-shell #filterRows { max-height:min(55vh,440px); }
  .workbench-shell .flabel { width:100%; padding-top:0; }
  .workbench-shell .fdate { width:100%; }
  .workbench-shell .fdate .finput { min-width:0; flex:1; width:110px; }
  .workbench-shell .fdate .fbtn { flex-basis:100%; }
  .workbench-shell #patientSheet { width:calc(100vw - 16px); max-height:calc(100dvh - 24px); border-radius:10px; }
  .workbench-shell .sheet-head { padding:12px; }
}
@media(max-width:560px) {
  .utility-page #scrollInner { padding:16px 12px 28px; }
  .utility-page .hero h1 { font-size:20px; }
  .utility-page .app-nav { gap:4px; }
  .utility-page .app-nav span { margin-left:0; flex:1; }
  .utility-page .sec-body { padding:12px; }
  .utility-page .query-filters label { min-width:0; flex-basis:calc(50% - 12px); }
  .utility-page .query-filters input,.utility-page .query-filters select { min-width:0; }
  .utility-page .query-filters .keyword-field { flex-basis:100%; }
  .utility-page :is(.fbtn,.lbtn),.utility-page .app-nav a { min-height:40px; }
  .utility-page .pagination { flex-wrap:wrap; }
  .login-screen #scrollInner { padding:40px 16px; }
  .login-screen .sec-body { padding:20px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; } }

/* One vertical scroll surface per page/dialog; a wide table only scrolls sideways. */
@media screen {
  body { height:100dvh; }
  .workbench-shell .app-shell { height:100%; min-height:0; }
  .workbench-shell #scrollArea,.utility-page #scrollArea { min-height:0; overflow-x:hidden; overflow-y:auto; }
  body.sheet-open #scrollArea { overflow-y:hidden; }
  .workbench-shell .table-scroll,.utility-page .table-scroll,.utility-page #tableWrap {
    max-height:none; overflow-x:auto; overflow-y:hidden; touch-action:pan-x pan-y; -webkit-overflow-scrolling:touch;
    scrollbar-width:thin; scrollbar-color:#809dab #edf2f4;
  }
  .table-scroll::-webkit-scrollbar { display:block; height:10px; }
  .table-scroll::-webkit-scrollbar-thumb { background:#809dab; border:2px solid #edf2f4; border-radius:8px; }
  .workbench-shell .card-b { min-width:0; }
  .workbench-shell .wb-table thead tr:first-child th:first-child { z-index:6; }
  .workbench-shell .page.active { display:flow-root; }
  .workbench-shell #patientSheet { overflow:auto; touch-action:pan-x pan-y; }
  .workbench-shell .sheet-head { z-index:10; }
  .workbench-shell #businessTabs { margin-inline:20px; scrollbar-width:thin; touch-action:pan-x pan-y; }
  .workbench-shell #businessTabs::-webkit-scrollbar { display:block; height:5px; }
  .workbench-shell #businessTabs::-webkit-scrollbar-thumb { background:#9eb5c2; border-radius:5px; }
}
@media screen and (max-width:760px) {
  .workbench-shell .table-scroll :is(th,td):first-child { min-width:100px; max-width:155px; white-space:normal; overflow-wrap:anywhere; }
  .workbench-shell #businessTabs { margin-inline:12px; }
  .workbench-shell .hero { padding-top:16px; }
  .workbench-shell .workbench-topbar { min-height:48px; padding:8px 12px; }
  .workbench-shell #lastUpdated { font-size:12px; }
  .workbench-shell .sptab,.workbench-shell .tab { min-height:40px; }
  .workbench-shell .table-scroll .wb-link { min-height:28px; }
}
