/* Loaded only at widths <=900px by the staff shell. Desktop/client styles are untouched. */
.staff-workspace .sidebar{width:64px;height:100dvh;overflow:hidden}
.staff-workspace .workspace{margin-left:64px;width:calc(100% - 64px);min-width:0}
.staff-workspace .sidebar .logo{padding:8px 2px}.staff-workspace .sidebar .wp-sidebar-name{display:none}
.staff-workspace .sidebar .side-links{margin-top:4px;gap:0;justify-content:space-evenly;padding-bottom:env(safe-area-inset-bottom,4px)}
.staff-workspace .sidebar .side-links a{min-height:0;padding:6px 2px;gap:3px;flex:1 1 0}
.staff-workspace .sidebar .side-links span{display:block;font-size:9px;line-height:1.2;overflow-wrap:anywhere}
.staff-workspace .sidebar .sidebar-icon{width:22px;height:22px}
.staff-workspace .topbar{padding:12px;flex-wrap:wrap;gap:8px;align-items:center}
.staff-workspace .top-label{font-size:10px;letter-spacing:.06em;flex:1 1 140px;min-width:0}
.staff-workspace .top-label-secondary{display:block;font-size:9px}
.staff-workspace .account{margin-left:auto;gap:8px}.staff-workspace .account>span{display:none}
.staff-workspace .topbar .pill{white-space:normal;max-width:100%}
.staff-workspace .workspace main{width:100%;max-width:100%;padding:0 12px;margin:18px auto;min-width:0}
.staff-workspace h1{font-size:25px;overflow-wrap:anywhere}.staff-workspace h2{font-size:19px;overflow-wrap:anywhere}
.staff-workspace p,.staff-workspace dd,.staff-workspace strong,.staff-workspace small{overflow-wrap:anywhere}
.staff-workspace .card{padding:16px;min-width:0}.staff-workspace .card>*{min-width:0}
.staff-workspace .cols,.staff-workspace .stats,.staff-workspace .reviewer-grid,.staff-workspace .details-grid,.staff-workspace .progress-grid,.staff-workspace .patient-appointments-grid,.staff-workspace .staff-admin-layout,.staff-workspace .mdtlayout,.staff-workspace .mdt-columns,.staff-workspace .mdt-reference-header,.staff-workspace .mdt-reference-criterion .mdt-columns{grid-template-columns:minmax(0,1fr)}
.staff-workspace .patient-identity h1{font-size:25px}.staff-workspace .patient-identity-meta{flex-wrap:wrap;gap:6px 14px}
.staff-workspace .patient-tabs{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;gap:2px;padding-bottom:3px;-webkit-overflow-scrolling:touch}
.staff-workspace .patient-tabs a{flex:0 0 auto;min-height:44px;padding:12px 10px}
.staff-workspace .heading,.staff-workspace .box-heading,.staff-workspace .timeline-top,.staff-workspace .criterion-header,.staff-workspace .report-section-heading{flex-wrap:wrap;align-items:flex-start;gap:10px}
.staff-workspace .record{flex-wrap:wrap;align-items:flex-start;gap:10px}.staff-workspace .record>div,.staff-workspace .record>span{min-width:0;max-width:100%}
.staff-workspace .record form{max-width:100%}.staff-workspace .pill{white-space:normal;max-width:100%}
.staff-workspace input,.staff-workspace select,.staff-workspace textarea{min-width:0;max-width:100%;font-size:16px}
/* Bound native iOS date controls to the form, including their internal value box. */
.staff-workspace input:is([type=date],[type=time],[type=datetime-local]){-webkit-appearance:none;appearance:none;box-sizing:border-box;width:100%;min-width:0;max-width:100%;inline-size:100%;min-inline-size:0;max-inline-size:100%;height:46px;min-height:46px;padding:10px 11px;font-size:16px;font-weight:400;line-height:24px;text-align:left}
.staff-workspace input:is([type=date],[type=time],[type=datetime-local])::-webkit-date-and-time-value{min-width:0;min-height:24px;text-align:left}
.staff-workspace input:is([type=date],[type=time],[type=datetime-local])::-webkit-datetime-edit{display:block;min-width:0;padding:0;text-align:left}
.staff-workspace fieldset{min-width:0;max-width:100%}.staff-workspace legend{max-width:100%;overflow-wrap:anywhere}
.staff-workspace input[type=checkbox],.staff-workspace input[type=radio]{flex-shrink:0;width:18px;height:18px}
.staff-workspace button,.staff-workspace .button,.staff-workspace summary{min-height:44px;white-space:normal;max-width:100%;overflow-wrap:anywhere}
.staff-workspace .buttons,.staff-workspace .form-actions,.staff-workspace .radio-row{flex-wrap:wrap}
.staff-workspace .measure-tools{flex-direction:column;align-items:stretch}.staff-workspace .measure-tools input,.staff-workspace .measure-tools select{max-width:100%;width:100%}
.staff-workspace .measure-table-wrap,.staff-workspace .calendar-scroll{max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.staff-workspace .send-options form{position:static;width:auto;max-width:100%;box-shadow:none}
.staff-workspace .calendar-page-heading{display:block}.staff-workspace .calendar-page-heading h1{margin-bottom:18px}
.staff-workspace .calendar-page-heading .calendar-toolbar{width:100%;max-width:100%;margin:0;gap:8px;flex-wrap:nowrap}
.staff-workspace .calendar-toolbar label,.staff-workspace .calendar-toolbar label:has(input[type=date]){flex:1 1 0;min-width:0;font-size:12px}
.staff-workspace .calendar-toolbar input,.staff-workspace .calendar-toolbar select{font-size:14px;padding:8px 4px}
.staff-workspace .calendar-toolbar button{padding:10px 8px;flex:0 0 auto;font-size:13px}
.staff-workspace .calendar-period-nav{font-size:14px;gap:8px;flex-wrap:wrap;line-height:1.7}
.staff-workspace .calendar-grid{min-width:700px;grid-template-columns:repeat(7,minmax(96px,1fr))}
.staff-workspace .calendar-day{padding:8px}
.staff-workspace .referral-grid{grid-template-columns:minmax(0,1fr)}
.staff-workspace .staff-table thead{display:none}.staff-workspace .staff-expander>summary{grid-template-columns:minmax(0,1fr);gap:5px}
.staff-workspace .staff-expander>summary>span{padding:0}.staff-workspace .staff-expander>summary>span:nth-child(2):before{content:'Email: ';font-weight:600}.staff-workspace .staff-expander>summary>span:nth-child(3):before{content:'Role: ';font-weight:600}
.staff-workspace .staff-expanded{padding:8px 10px 18px}
.staff-workspace .toc{position:static;max-height:none}.staff-workspace .evidence-column{max-height:none!important;padding:12px}
.staff-workspace .mdt-reference-criterion,.staff-workspace .mdt-final-score{padding:14px}
.staff-workspace .mdt-score-options span{padding:12px 10px;min-height:44px}
.staff-workspace .report-document{width:100%;margin:18px 0}.staff-workspace .report-cover{padding:18px 12px;min-height:0}.staff-workspace .report-section{padding:20px 12px}
.staff-workspace .report-details{grid-template-columns:minmax(0,1fr)}.staff-workspace .report-details dd{margin:0 0 12px;overflow-wrap:anywhere}
.staff-workspace .report-review{flex-direction:column;align-items:stretch}.staff-workspace .ai-source-dialog{max-width:calc(100vw - 24px);padding:16px}
.staff-workspace footer{padding:18px 10px}
@media(max-height:480px){.staff-workspace .sidebar .logo{padding:4px}.staff-workspace .sidebar .wp-mark{width:26px;height:26px;font-size:20px}.staff-workspace .sidebar .side-links a{padding:2px;gap:1px}.staff-workspace .sidebar .sidebar-icon{width:17px;height:17px}.staff-workspace .sidebar .side-links span{font-size:8px}}
.staff-workspace .sidebar .wp-mark{display:flex}
.staff-workspace .patient-identity-meta span{white-space:normal;overflow-wrap:anywhere}
.staff-workspace .entry-grid{grid-template-columns:minmax(0,1fr)}
.staff-workspace pre{max-width:100%;overflow-x:auto}
.staff-workspace .report-document table{display:block;max-width:100%;overflow-x:auto}
@media(max-width:480px){
 .staff-workspace .calendar-page-heading .calendar-toolbar:has(input[type=date]){display:grid;grid-template-columns:minmax(0,1fr) auto}
 .staff-workspace .calendar-toolbar:has(input[type=date])>label:first-child{grid-column:1 / -1}
 .staff-workspace .calendar-toolbar input,.staff-workspace .calendar-toolbar select{font-size:16px}
}
.staff-workspace a{overflow-wrap:anywhere}
.staff-workspace img{max-width:100%;height:auto}

/* v2.26: header navigation frees the full mobile content width. */
.staff-workspace .sidebar{display:none}
.staff-workspace .workspace{margin-left:0;width:100%}
.staff-workspace .staff-mobile-menu{display:block;order:4;margin-left:auto;max-width:100%}
.staff-workspace .staff-mobile-menu>summary{display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;list-style:none;padding:9px 12px;border:1px solid #cad9d3;border-radius:7px;color:var(--wp-ink);font-size:14px;font-weight:700;min-height:44px}
.staff-workspace .staff-mobile-menu>summary::-webkit-details-marker{display:none}
.staff-workspace .staff-mobile-menu>summary:focus-visible{outline:3px solid #7fa99b;outline-offset:2px}
.staff-workspace .staff-mobile-menu[open]{flex-basis:100%;margin-left:0}
.staff-workspace .staff-mobile-menu[open]>summary{width:max-content;margin-left:auto;background:#edf5f0}
.staff-workspace .mobile-header-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;border-top:1px solid #dce7e1;padding-top:12px;margin-top:12px}
.staff-workspace .mobile-header-links a{display:flex;align-items:center;gap:9px;min-height:48px;padding:10px;border-radius:7px;background:#f2f7f4;text-decoration:none;color:var(--wp-ink);font-weight:600;font-size:13px;min-width:0}
.staff-workspace .mobile-header-links svg{width:22px;height:22px;flex:none}
.staff-workspace .mobile-header-links a:focus-visible{outline:3px solid #7fa99b;outline-offset:1px}
@media(max-width:360px){.staff-workspace .mobile-header-links{grid-template-columns:minmax(0,1fr)}}

/* v2.27: one header row; patient risk belongs beside the client identity. */
.staff-workspace .topbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;position:relative;z-index:20}
.staff-workspace .topbar>.top-label{grid-column:1;grid-row:1;min-width:0}
.staff-workspace .topbar>.global-risk-alert{display:none}
.staff-workspace .topbar>.account{grid-column:2;grid-row:1;margin:0;white-space:nowrap}
.staff-workspace .topbar>.staff-mobile-menu,.staff-workspace .topbar>.staff-mobile-menu[open]{grid-column:3;grid-row:1;margin:0;max-width:none;position:static}
.staff-workspace .staff-mobile-menu>summary{padding:8px 10px;white-space:nowrap}
.staff-workspace .staff-mobile-menu[open]>summary{margin:0}
.staff-workspace .staff-mobile-menu .mobile-header-links{position:absolute;top:100%;left:0;right:0;margin:0;padding:12px;background:#fff;border-bottom:1px solid #dce7e1;box-shadow:0 8px 18px #18372b18;max-height:70dvh;overflow-y:auto}
.staff-workspace .patient-name-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;margin-bottom:8px}
.staff-workspace .patient-name-row:has(.patient-risk-mobile) h1{margin:0;min-width:0}
.staff-workspace .patient-name-row:not(:has(.patient-risk-mobile)){grid-template-columns:minmax(0,1fr)}
.staff-workspace .patient-risk-mobile{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
@media(max-width:360px){.staff-workspace .topbar{gap:6px;padding:10px}.staff-workspace .top-label{font-size:9px;letter-spacing:.02em}.staff-workspace .top-label-secondary{font-size:8px}.staff-workspace .staff-mobile-menu>summary{font-size:13px;padding:8px}.staff-workspace .patient-name-row{gap:9px}.staff-workspace .patient-name-row h1{font-size:23px}}

/* Keep the same bounded scroll pane below the mobile client ribbon. */
.staff-workspace .workspace main{margin:18px auto 0;min-height:0}
.staff-workspace .patient-name-row .patient-risk-mobile{font-size:11px;line-height:normal;padding:5px 10px;min-height:0;max-width:none;border-radius:30px;white-space:nowrap}
@media(max-height:500px){.staff-workspace .workspace main{margin-top:8px}.staff-workspace .patient-tabs a{min-height:36px;padding:8px}}

/* v2.38: collapse supplementary identity details while the content scrolls. */
.staff-workspace .patient-identity-meta{font-size:13px;gap:4px 12px;line-height:1.5}
.staff-workspace .patient-details-toggle{display:inline-flex;align-items:center;min-height:32px;margin:4px 0 0;padding:4px 0;border:0;background:transparent;color:var(--wp-deep);font-size:12px;font-weight:400;text-decoration:underline}
.staff-workspace .patient-identity.details-collapsed .patient-identity-meta{display:none}
.staff-workspace .patient-identity.details-collapsed{margin-bottom:6px}
.staff-workspace .patient-details-toggle:focus-visible{outline:2px solid #7fa99b;outline-offset:2px}
.staff-workspace .workspace-scroll{overflow-anchor:none}

@media(max-height:500px){.staff-workspace .patient-identity-meta{max-height:22dvh;overflow:auto}}
