/* Canonical RXOPD production presentation layer. Versioned patch layers have been consolidated. */
/* R15 role-portal compact UI normalization — final cascade layer. */
.rx-role-shell :is(.opdops-hero,.rx21-risk-hero,.rxui-hero,.rmpb-head,.rp-head,.rmp-perf-head){
  min-height:0!important;margin:0 0 10px!important;padding:11px 14px!important;border-radius:16px!important;gap:10px!important;align-items:center!important
}
.rx-role-shell :is(.opdops-hero,.rx21-risk-hero,.rxui-hero,.rmpb-head,.rp-head,.rmp-perf-head) h1{margin:0!important;font-size:clamp(18px,1.65vw,24px)!important;line-height:1.12!important;letter-spacing:-.02em!important}
.rx-role-shell :is(.opdops-hero,.rx21-risk-hero,.rxui-hero,.rmpb-head,.rp-head,.rmp-perf-head) p{margin:2px 0 0!important;font-size:11px!important;line-height:1.35!important;color:#587086!important;max-width:900px!important}
.rx-role-shell :is(.opdops-kicker,.rxui-eyebrow,.eyebrow){font-size:9px!important;line-height:1!important;letter-spacing:.08em!important}
.rx-role-shell .rxui-hero{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(180px,260px)!important}
.rx-role-shell .rxui-hero-copy p{display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
.rx-role-shell .rxui-hero-side{padding:9px 11px!important;border-radius:12px!important}.rx-role-shell .rxui-hero-side strong{font-size:15px!important}.rx-role-shell .rxui-hero-side span{font-size:10px!important}
.rx-role-shell .rxui-vital-actions{gap:8px!important;margin:0 0 10px!important}.rx-role-shell .rxui-action-card{min-height:64px!important;padding:9px 11px!important;border-radius:12px!important}.rx-role-shell .rxui-action-card .icon{width:34px!important;height:34px!important}.rx-role-shell .rxui-action-card b{font-size:11px!important}.rx-role-shell .rxui-action-card span span{font-size:9px!important}
.rx-role-shell .rxui-instruction{padding:10px 12px!important;margin-bottom:10px!important;font-size:10px!important}.rx-role-shell .rxui-instruction ol{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;margin:5px 0 0 16px!important}.rx-role-shell .rxui-instruction li{padding-right:5px!important}
.rx-role-shell .rxui-kpis{gap:8px!important}.rx-role-shell .rxui-kpi{padding:10px 12px!important;border-radius:12px!important}.rx-role-shell .rxui-kpi strong{font-size:20px!important}

/* Doctor assistant management */
.r15-assistant-main-grid{display:grid;grid-template-columns:minmax(300px,.82fr) minmax(520px,1.45fr);gap:10px;margin-bottom:10px}.r15-assistant-boundaries{display:grid;grid-template-columns:1fr 1fr;gap:10px}.r15-assistant-page .opdops-card{padding:12px!important;border-radius:14px!important}.r15-assistant-page .opdops-card-head{margin-bottom:8px!important}.r15-assistant-page .opdops-card-head h2{font-size:14px!important}.r15-assistant-page .opdops-table-wrap th,.r15-assistant-page .opdops-table-wrap td{padding:7px 8px!important;font-size:10px!important}.r15-assistant-page .opdops-inline-form{grid-template-columns:minmax(90px,1fr) auto!important;gap:5px!important}.r15-assistant-page .opdops-inline-form input{min-height:32px!important;padding:6px 8px!important}.r15-assistant-page .opdops-bullets{display:grid!important;grid-template-columns:1fr 1fr!important;gap:5px 16px!important;margin:0!important;padding:8px 10px 8px 26px!important}.r15-assistant-page .opdops-bullets li{font-size:10px!important}.r15-request-grid article{padding:9px!important;border-radius:11px!important}.r15-request-grid article form{gap:5px!important}.r15-request-grid input{min-height:32px!important}

/* Patient risk */
.r15-risk-stats{gap:8px!important;margin-bottom:10px!important}.r15-risk-stats article{padding:9px 11px!important;border-radius:12px!important}.r15-risk-stats article strong{font-size:20px!important}.r15-risk-card{padding:11px!important;border-radius:14px!important}.r15-risk-card .section-head{margin-bottom:7px!important}.r15-risk-card th,.r15-risk-card td{padding:7px 8px!important;font-size:10px!important}.r15-hero-actions{display:flex!important;align-items:center!important;gap:6px!important}.r15-hero-actions .btn{min-height:34px!important;padding:0 12px!important;border-radius:9px!important}

/* Doctor schedule: compact weekdays, saved dates and change controls. */
.rx-role-shell .rxds-weekday-grid,.rx-role-shell .rxds-weekday-options{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important}.rx-role-shell .rxds-weekday-grid label,.rx-role-shell .rxds-weekday-options label,.rx-role-shell .rxds-date-grid label,.rx-role-shell .rxds-bulk-options label{min-height:42px!important;padding:7px 9px!important;border-radius:10px!important;align-items:center!important;gap:7px!important}.rx-role-shell .rxds-weekday-grid input,.rx-role-shell .rxds-weekday-options input,.rx-role-shell .rxds-date-grid input,.rx-role-shell .rxds-bulk-options input{width:18px!important;height:18px!important}.rx-role-shell .rxds-weekday-grid span,.rx-role-shell .rxds-weekday-options span,.rx-role-shell .rxds-date-grid span{font-size:10px!important}.rx-role-shell .rxds-bulk-date-list,.rx-role-shell .rxds-date-grid{gap:6px!important}.rx-role-shell .rxds-bulk-date-list label{padding:6px 7px!important;min-height:42px!important}.rx-role-shell .opdops-card{border-radius:14px!important}.rx-role-shell .opdops-card-head{padding-bottom:5px!important}.rx-role-shell .opdops-card-head h2{font-size:14px!important}

/* Patient appointment share actions */
.r15-patient-ticket-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}.r15-patient-ticket-actions a,.r15-patient-ticket-actions button{min-height:34px;padding:0 11px;border:1px solid #cbdfee;border-radius:9px;background:#fff;color:#0b5eb8;font:inherit;font-size:10px;font-weight:850;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.r15-patient-ticket-actions button{background:#0b63f6;border-color:#0b63f6;color:#fff;cursor:pointer}

@media(max-width:1050px){.r15-assistant-main-grid{grid-template-columns:1fr}.rx-role-shell .rxui-instruction ol{grid-template-columns:repeat(2,minmax(0,1fr))!important}.rx-role-shell .rxds-weekday-grid,.rx-role-shell .rxds-weekday-options{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:720px){.rx-role-shell :is(.opdops-hero,.rx21-risk-hero,.rxui-hero,.rmpb-head,.rp-head,.rmp-perf-head){padding:9px 10px!important;border-radius:13px!important}.rx-role-shell .rxui-hero{grid-template-columns:1fr!important}.rx-role-shell .rxui-hero-side{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}.r15-assistant-boundaries{grid-template-columns:1fr}.r15-assistant-page .opdops-bullets{grid-template-columns:1fr 1fr!important}.rx-role-shell .rxds-weekday-grid,.rx-role-shell .rxds-weekday-options{grid-template-columns:repeat(2,minmax(0,1fr))!important}.r15-patient-ticket-actions>*{flex:1}.r15-risk-card .table-wrap{overflow-x:auto}}
@media(max-width:460px){.rx-role-shell .rxui-instruction ol{grid-template-columns:1fr!important}.r15-assistant-page .opdops-bullets{grid-template-columns:1fr!important}}
/* Exact doctor schedule selectors from current production views. */
.rx-role-shell .rxds-weekdays{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:5px!important;margin-top:6px!important}.rx-role-shell .rxds-weekdays label{min-height:36px!important;padding:0!important}.rx-role-shell .rxds-weekdays span{min-width:0!important;min-height:34px!important;padding:4px!important;border-radius:8px!important;font-size:10px!important}.rx-role-shell .rxds-bulk-scope,.rx-role-shell .rxds-bulk-fields{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}.rx-role-shell .rxds-bulk-scope label,.rx-role-shell .rxds-bulk-fields label{min-height:34px!important;padding:5px 7px!important;border-radius:9px!important}.rx-role-shell .rxds-bulk-session-list{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;max-height:170px!important}.rx-role-shell .rxds-bulk-session-list label{min-height:40px!important;padding:5px 6px!important}.rx-role-shell .rxds-bulk-edit-card .opdops-form{gap:8px!important}
@media(max-width:760px){.rx-role-shell .rxds-weekdays{grid-template-columns:repeat(4,minmax(0,1fr))!important}.rx-role-shell .rxds-bulk-session-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}.rx-role-shell .rxds-bulk-scope,.rx-role-shell .rxds-bulk-fields{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:480px){.rx-role-shell .rxds-weekdays{grid-template-columns:repeat(4,minmax(0,1fr))!important}.rx-role-shell .rxds-bulk-session-list{grid-template-columns:1fr 1fr!important}.rx-role-shell .rxds-bulk-scope,.rx-role-shell .rxds-bulk-fields{grid-template-columns:1fr 1fr!important}}
/* Additional first-card families found across current role views. */
.rx-role-shell :is(.rxdp-hero,.rx33-workflow-head,.rxqr-hero,.rxch-hero,.rx23-page-head,.rx23-selected-head,.rxopd-welcome-card){min-height:0!important;margin-bottom:10px!important;padding:10px 13px!important;border-radius:15px!important;gap:9px!important}.rx-role-shell :is(.rxdp-hero,.rx33-workflow-head,.rxqr-hero,.rxch-hero,.rx23-page-head,.rx23-selected-head,.rxopd-welcome-card) h1{font-size:clamp(18px,1.6vw,24px)!important;line-height:1.12!important;margin-block:0!important}.rx-role-shell :is(.rxdp-hero,.rx33-workflow-head,.rxqr-hero,.rxch-hero,.rx23-page-head,.rx23-selected-head,.rxopd-welcome-card) p{font-size:11px!important;line-height:1.35!important;margin-block:2px!important}

/* R17 role-portal readability: one measured step larger without rebuilding page layouts. */
.rx-role-main{font-size:14px!important}
.rx-role-main :where(label,input,select,textarea,button){font-size:13.5px!important}
.rx-role-main :where(td,th){font-size:12.5px!important}
.rx-role-main :where(p,li,small){line-height:1.4}
.rx-role-main :where(.rmpb-card,.rxui-card,.rxdp-card,.rx23-card,.rxqr-card,.rxch-card) p{font-size:13px}
.rx-role-main :where(.rmpb-card,.rxui-card,.rxdp-card,.rx23-card,.rxqr-card,.rxch-card) button,
.rx-role-main :where(.rmpb-card,.rxui-card,.rxdp-card,.rx23-card,.rxqr-card,.rxch-card) a{font-size:13px}
@media(max-width:700px){.rx-role-main{font-size:13.5px!important}.rx-role-main :where(label,input,select,textarea,button){font-size:13px!important}.rx-role-main :where(td,th){font-size:12px!important}}

/* R20 production hotfix: owner OPD recovery + doctor scheduler containment + token inventory density. */

/* Doctor Management: the schedule-mode labels must never collapse into one-character columns. */
.rx23-selected-shell{container-type:inline-size!important;container-name:rx23doctor!important}
.rx23-mode-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;
  gap:9px!important;
  width:100%!important;
  min-width:0!important;
}
.rx23-mode-grid label{display:block!important;width:100%!important;min-width:0!important;max-width:none!important}
.rx23-mode-grid label>span{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:70px!important;
  padding:10px 11px!important;
  overflow:hidden!important;
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
}
.rx23-mode-grid label>span b,
.rx23-mode-grid label>span small{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  white-space:normal!important;
  hyphens:none!important;
  text-align:left!important;
}
.rx23-mode-grid label>span b{font-size:13px!important;line-height:1.2!important}
.rx23-mode-grid label>span small{font-size:11px!important;line-height:1.25!important;margin-top:3px!important}
.rx23-config-grid{min-width:0!important}
.rx23-panel{min-width:0!important}
@container rx23doctor (max-width:900px){
  .rx23-config-grid{grid-template-columns:1fr!important}
  .rx23-mode-grid{grid-template-columns:repeat(2,minmax(150px,1fr))!important}
}
@container rx23doctor (max-width:430px){
  .rx23-mode-grid{grid-template-columns:1fr!important}
}
@media(max-width:1280px){
  .rx23-mode-grid{grid-template-columns:repeat(2,minmax(150px,1fr))!important}
}
@media(max-width:520px){
  .rx23-mode-grid{grid-template-columns:1fr!important}
}

/* Unified Token Inventory: restore the card/grid layout and keep 50+ tokens scannable. */
.token-inventory-head{padding:14px 16px!important;border-radius:16px!important;margin-bottom:10px!important}
.token-inventory-head h1{font-size:clamp(20px,2vw,28px)!important;line-height:1.15!important;margin:5px 0!important}
.token-inventory-head p{font-size:12px!important;line-height:1.4!important;margin:0!important}
.token-toolbar{padding:12px!important;margin-bottom:10px!important}
.token-filter-form{display:grid!important;grid-template-columns:minmax(300px,1fr) auto auto!important;gap:8px!important;align-items:end!important}
.token-filter-form label{min-width:0!important;margin:0!important}
.token-filter-form select{width:100%!important;min-width:0!important;min-height:38px!important;font-size:12px!important}
.token-filter-form .btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:38px!important;padding:0 11px!important;white-space:nowrap!important}
.token-stats-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:7px!important;margin:10px 0!important}
.token-stat{min-width:0!important;min-height:68px!important;padding:9px 10px!important;border-radius:12px!important;box-shadow:none!important}
.token-stat small{font-size:10px!important;line-height:1.15!important}
.token-stat strong{font-size:19px!important;line-height:1.1!important;margin-top:3px!important}
.live-token-card{padding:13px!important;border-radius:15px!important}
.live-token-card .section-title-row{margin-bottom:7px!important}
.live-token-card .section-title-row h2{font-size:17px!important;margin:0!important}
.live-token-card .section-title-row p,.live-token-card>.rxqr-muted{font-size:11px!important;line-height:1.35!important;margin:2px 0 8px!important}
.token-board{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(145px,1fr))!important;
  gap:7px!important;
  align-items:stretch!important;
}
.token-tile{min-width:0!important;min-height:102px!important;padding:10px!important;border-radius:12px!important;box-shadow:none!important}
.token-no{font-size:18px!important;line-height:1!important}
.token-tile>strong{font-size:12px!important;line-height:1.2!important;margin-top:5px!important}
.token-tile>small{font-size:10px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.token-tile>em{font-size:9px!important;line-height:1.2!important;margin-top:3px!important}
.token-action-form,.rx19-cancel-form{gap:5px!important;margin-top:7px!important}
.token-action-form select,.token-action-form input,.rx19-cancel-form input{min-height:32px!important;padding:5px 7px!important;font-size:10px!important}
.token-action-form button,.rx19-cancel-form button{min-height:32px!important;padding:5px 8px!important;font-size:10px!important}
.rx19-lifecycle-wrap{gap:10px!important;margin-top:10px!important}
.rx19-statement-grid{gap:6px!important}

@media(max-width:980px){
  .token-filter-form{grid-template-columns:1fr 1fr!important}
  .token-filter-form label{grid-column:1/-1!important}
  .token-stats-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .token-board{grid-template-columns:repeat(auto-fill,minmax(135px,1fr))!important}
}
@media(max-width:620px){
  .token-filter-form{grid-template-columns:1fr!important}
  .token-filter-form label{grid-column:auto!important}
  .token-stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .token-board{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:390px){
  .token-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .token-board{grid-template-columns:1fr!important}
}

/* Final canonical production alignment. */
body.rx-ui-system{--rx-production-card-radius:12px;}
body.rx-ui-system .rx-role-topbar{min-height:64px;align-items:center;gap:10px;}
body.rx-ui-system .rx-role-header-left{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 auto;}
body.rx-ui-system .rx-role-top-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto;}
body.rx-role-shell .rx23-mode-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;width:100%!important;}
body.rx-role-shell .rx23-mode-grid label{min-width:0!important;width:100%!important;}
body.rx-role-shell .rx23-mode-grid label>span{min-width:0!important;width:100%!important;min-height:84px!important;padding:12px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important;overflow:hidden!important;}
body.rx-role-shell .rx23-mode-grid label>span :is(b,small){width:100%!important;white-space:normal!important;word-break:normal!important;overflow-wrap:break-word!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important;text-align:left!important;}
body.rx-role-shell .rx23-mode-grid label>span b{font-size:13px!important;line-height:1.25!important;}
body.rx-role-shell .rx23-mode-grid label>span small{font-size:12px!important;line-height:1.3!important;}
body.rx-standard-shell.rx-ui-app:has(.rxopd-login-clean) .rxopd-login-clean :is(.rxopd-public-auth-submit,.rxopd-public-auth-linkbtn,.rxopd-login-tabs-main button,.rxopd-login-tabs-main a,.rxopd-login-secondary-links a){min-height:44px!important;height:auto!important;font-size:12px!important;transform:none!important;touch-action:manipulation!important;}
body.rx-standard-shell.rx-ui-app:has(.rxopd-login-clean) .rxopd-login-clean .rxopd-public-auth-form :is(input,select){min-height:44px!important;height:44px!important;font-size:14px!important;}
body.rx-standard-shell.rx-ui-app:has(.rxopd-login-clean) .rxopd-login-clean .rxopd-public-auth-form label{font-size:13px!important;}
@media(max-width:767px){
  body.rx-role-shell .rx23-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
  body.rx-role-shell .rx23-mode-grid label>span{min-height:78px!important;padding:10px!important;}
}

/* Canonical interactive typography and touch geometry — final cascade contract. */
body.rx-ui-system .rx-role-main :is(button,.btn,.button,.rx-btn,input,select,textarea){font-size:13.5px!important;}
body.rx-ui-system .rx-role-main :is(button,.btn,.button,.rx-btn){min-height:40px!important;}
body.rx-ui-system .clean-admin-page :is(button,.btn,.button,.rx-btn,input,select,textarea){font-size:13px!important;}
body.rx-ui-system .clean-admin-page :is(button,.btn,.button,.rx-btn){min-height:40px!important;}
body.rx-ui-system .rx-page :is(button,.btn,.button,.rx-btn,input,select,textarea){font-size:14px!important;}
body.rx-ui-system .rx-page :is(button,.btn,.button,.rx-btn){min-height:40px!important;}
body.rx-ui-system :is(.rx-role-main,.clean-admin-page,.rx-page) a[class*="btn"],
body.rx-ui-system :is(.rx-role-main,.clean-admin-page,.rx-page) a[class*="button"]{font-size:13px!important;min-height:40px!important;display:inline-flex;align-items:center;justify-content:center;}
body.rx-ui-system .rx-public-drawer-head-centered{display:flex!important;align-items:center!important;justify-content:center!important;min-height:72px!important;padding:12px 16px!important;}
body.rx-ui-system .rx-public-drawer-head-centered .rx-logo-brand{margin-inline:auto!important;}
body.rx-ui-system .rx-public-drawer-head-centered img{display:block!important;max-width:136px!important;height:auto!important;margin:auto!important;}
@media(max-width:767px){
  body.rx-ui-system .rx-role-main :is(button,.btn,.button,.rx-btn),
  body.rx-ui-system .clean-admin-page :is(button,.btn,.button,.rx-btn),
  body.rx-ui-system .rx-page :is(button,.btn,.button,.rx-btn),
  body.rx-ui-system :is(.rx-role-main,.clean-admin-page,.rx-page) a[class*="btn"],
  body.rx-ui-system :is(.rx-role-main,.clean-admin-page,.rx-page) a[class*="button"]{min-height:44px!important;}
}

/* Assistant/public mobile visual repair: canonical role hamburger + home search geometry. */
body.rx-role-shell .rx-role-menu-button.rx-shell-hamburger{
  background:#0d4f91!important;
  color:#fff!important;
  border:1px solid #0d4f91!important;
  box-shadow:0 6px 16px rgba(13,79,145,.20)!important;
}
body.rx-role-shell .rx-role-menu-button.rx-shell-hamburger>span{
  background:#fff!important;
  color:#fff!important;
  opacity:1!important;
}
body.rx-role-shell .rx-role-menu-button.rx-shell-hamburger[aria-expanded="true"],
body.rx-role-shell.rx-role-menu-open .rx-role-menu-button.rx-shell-hamburger{
  background:#0d9b73!important;
  border-color:#0d9b73!important;
  color:#fff!important;
}

@media(max-width:720px){
  body.rx-ui-home .rxhome-search.rxhome-location-search-compact{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
    width:100%!important;
    max-width:none!important;
    margin:14px 0 10px!important;
  }
  body.rx-ui-home .rxhome-search.rxhome-location-search-compact>.rxhome-btn{
    order:1!important;
    width:100%!important;
    min-height:48px!important;
    height:48px!important;
    border-radius:12px!important;
  }
  body.rx-ui-home .rxhome-search.rxhome-location-search-compact>.rxhome-field-select{
    order:2!important;
    display:flex!important;
    width:100%!important;
    height:48px!important;
    min-height:48px!important;
    padding:0 12px!important;
    border:1px solid #cfe0f5!important;
    border-radius:12px!important;
    background:#fff!important;
    overflow:hidden!important;
  }
  body.rx-ui-home .rxhome-search.rxhome-location-search-compact>.rxhome-field-select select{
    width:100%!important;
    height:46px!important;
    min-height:46px!important;
    padding:0 32px 0 6px!important;
    margin:0!important;
    border:0!important;
    background:transparent!important;
    font-size:14px!important;
    line-height:1.2!important;
  }
  body.rx-ui-home .rxhome-search.rxhome-location-search-compact>.rxhome-location-entry{
    order:3!important;
    position:relative!important;
    display:grid!important;
    grid-template-columns:46px minmax(0,1fr)!important;
    align-items:stretch!important;
    width:100%!important;
    min-width:0!important;
    height:48px!important;
    min-height:48px!important;
    padding:0!important;
    border:1px solid #cfe0f5!important;
    border-radius:12px!important;
    background:#fff!important;
    overflow:hidden!important;
    box-shadow:0 6px 16px rgba(11,94,215,.05)!important;
  }
  body.rx-ui-home .rxhome-location-entry .rxhome-location-detect{
    position:static!important;
    grid-column:1!important;
    width:46px!important;
    min-width:46px!important;
    height:46px!important;
    min-height:46px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:11px 0 0 11px!important;
    box-shadow:none!important;
  }
  body.rx-ui-home .rxhome-location-entry .rxhome-field-location{
    grid-column:2!important;
    display:flex!important;
    align-items:center!important;
    width:100%!important;
    min-width:0!important;
    height:46px!important;
    min-height:46px!important;
    margin:0!important;
    padding:0 12px!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#fff!important;
  }
  body.rx-ui-home .rxhome-location-entry .rxhome-field-location input{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    font-size:14px!important;
    line-height:1.2!important;
  }
}

/* Doctor portal usability normalization: shared PC + mobile audit. */
body.rx-role-shell.role-doctor{
  --rxdoc-text:#111827;
  --rxdoc-muted:#5f6f82;
  --rxdoc-border:#dce5ef;
  --rxdoc-primary:#1d5fa7;
  --rxdoc-success:#0b8a62;
  --rxdoc-warning:#9a6700;
  --rxdoc-danger:#b42318;
  --rxdoc-radius-control:8px;
  --rxdoc-radius-card:12px;
  --rxdoc-radius-large:16px;
}
body.rx-role-shell.role-doctor .rx-role-user-card span{
  font-size:12px!important;
  line-height:1.35!important;
}
body.rx-role-shell.role-doctor .rx-role-nav-group h2{
  font-size:12px!important;
  line-height:1.25!important;
  letter-spacing:.02em!important;
  text-transform:none!important;
}
body.rx-role-shell.role-doctor .rx-role-nav-group a{
  border-radius:var(--rxdoc-radius-card)!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxui-eyebrow,
body.rx-role-shell.role-doctor .rx-role-main .rxui-panel-head small{
  font-size:12px!important;
  line-height:1.3!important;
  letter-spacing:.02em!important;
  text-transform:none!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxui-hero,
body.rx-role-shell.role-doctor .rx-role-main .rxui-panel{
  border-radius:var(--rxdoc-radius-large)!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxui-action-card,
body.rx-role-shell.role-doctor .rx-role-main .rxui-kpi{
  border-radius:var(--rxdoc-radius-card)!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxui-action-card b{
  font-size:14px!important;
  line-height:1.25!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxui-action-card>span:last-child>span,
body.rx-role-shell.role-doctor .rx-role-main .rxui-action-card span span{
  font-size:12.5px!important;
  line-height:1.35!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxdd-session-side{
  align-self:stretch!important;
  display:grid!important;
  align-content:center!important;
  gap:6px!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxdd-session-label{
  display:block!important;
  margin:0!important;
  font-size:13px!important;
  line-height:1.2!important;
  font-weight:700!important;
  color:var(--rxdoc-muted)!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxdd-session-side select{
  min-height:42px!important;
  border-radius:var(--rxdoc-radius-control)!important;
  font-size:14px!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxui-process{
  gap:8px!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxui-process>span{
  min-height:40px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:8px 10px!important;
  border-radius:var(--rxdoc-radius-control)!important;
  background:#f7f9fc!important;
  border:1px solid var(--rxdoc-border)!important;
  color:#4c5f75!important;
  font-size:12px!important;
  line-height:1.25!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxui-process>span.done{
  background:#e8f7f1!important;
  border-color:#a9ddc9!important;
  color:#126647!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxui-process>span.current{
  background:#eaf2ff!important;
  border-color:#9ec1ed!important;
  color:#174f83!important;
  box-shadow:inset 0 0 0 1px #9ec1ed!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxui-info-note{
  border:1px solid #cfe0f1!important;
  border-left:4px solid var(--rxdoc-primary)!important;
  background:#f7fbff!important;
  color:var(--rxdoc-text)!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxui-info-note strong{
  color:#174f83!important;
}
body.rx-role-shell.role-doctor .rx-role-main .rxdd-report-link span{
  font-size:12.5px!important;
  line-height:1.35!important;
}
body.rx-role-shell.role-doctor .rx-role-main :is(.rxui-panel-head>a,.rxdd-report-link,.rx-btn,a.rx-btn,button.rx-btn){
  min-height:40px!important;
  border-radius:var(--rxdoc-radius-control)!important;
  font-size:13px!important;
}
body.rx-role-shell.role-doctor.rx-pwa-dock-active .rx-role-main{
  padding-bottom:118px!important;
}
@media(max-width:600px){
  body.rx-role-shell.role-doctor .rx-role-main .rxui-vital-actions .rxdd-bottom-duplicate{display:none!important}
  body.rx-role-shell.role-doctor .rx-role-main .rxui-vital-actions{
    grid-template-columns:1fr!important;
  }
  body.rx-role-shell.role-doctor .rx-role-main .rxui-vital-actions .rxdd-unique-action{
    min-height:64px!important;
  }
  body.rx-role-shell.role-doctor .rx-pwa-install{
    bottom:calc(var(--rx-role-bottom-nav-height,76px) + 8px)!important;
    max-width:calc(100vw - 20px)!important;
  }
  body.rx-role-shell.role-doctor.rx-pwa-dock-active .rx-role-main{
    padding-bottom:calc(var(--rx-role-bottom-nav-height,76px) + 98px)!important;
  }
  body.rx-role-shell.role-doctor .rx-role-main .rxdd-session-side select{
    min-height:44px!important;
  }
}
@media(max-width:600px){
  body.rx-role-shell.role-doctor .rx-pwa-install-action{
    min-height:44px!important;
    height:44px!important;
    font-size:12px!important;
  }
  body.rx-role-shell.role-doctor .rx-pwa-install-close{
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
  }
}

/* 2026-08-31 final role-portal scheduler guard. This layer loads after the
   doctor-management styles, so it is the authoritative split-screen fix. */
body.rx-role-shell .rx-role-main .rx23-doctor-management .rx23-mode-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;
  gap:9px!important;
  width:100%!important;
  min-width:0!important;
}
body.rx-role-shell .rx-role-main .rx23-doctor-management .rx23-mode-grid>label{
  position:relative!important;
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
body.rx-role-shell .rx-role-main .rx23-doctor-management .rx23-mode-grid>label>input[type="radio"]{
  position:absolute!important;
  width:1px!important;height:1px!important;min-width:1px!important;min-height:1px!important;
  opacity:0!important;pointer-events:none!important;
}
body.rx-role-shell .rx-role-main .rx23-doctor-management .rx23-mode-grid>label>span{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:4px!important;
  width:100%!important;
  min-width:0!important;
  min-height:70px!important;
  padding:10px 12px!important;
  border:1px solid #dce6ee!important;
  border-radius:11px!important;
  background:#fff!important;
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  overflow:hidden!important;
}
body.rx-role-shell .rx-role-main .rx23-doctor-management .rx23-mode-grid>label>span :is(b,small){
  display:block!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  text-align:left!important;
}
body.rx-role-shell .rx-role-main .rx23-doctor-management .rx23-mode-grid>label>input:checked+span{
  border-color:#3db58a!important;background:#effcf6!important;box-shadow:0 0 0 2px rgba(61,181,138,.10)!important
}
body.rx-role-shell .rx-role-main .rx23-doctor-management :is(.rx23-weekdays,.rxds-bulk-scope,.rxds-bulk-fields) :is(label,span,b,small){
  writing-mode:horizontal-tb!important;text-orientation:mixed!important;word-break:normal!important;overflow-wrap:normal!important
}
@media(max-width:620px){body.rx-role-shell .rx-role-main .rx23-doctor-management .rx23-mode-grid{grid-template-columns:1fr!important}}
body.rx-role-shell.role-doctor .rxdd-session-side .rxdd-approval-link{display:inline-flex!important;align-items:center!important;justify-content:center!important;align-self:flex-start!important;min-height:30px!important;padding:5px 9px!important;border:1px solid #b9d8ee!important;border-radius:9px!important;background:#fff!important;color:#0b66b2!important;font-size:9.5px!important;font-weight:900!important;text-decoration:none!important;white-space:nowrap!important}

/* Authenticated cross-role responsive containment.
   Final production layer for Admin, Staff, Doctor, Assistant, Patient, Company,
   RMP, Pharmacy and Owner portals. It normalizes containment only; module
   colors, workflows and business logic remain owned by their existing CSS. */
:is(body.rx-role-shell,body.clean-admin-shell,body.staff-desk-shell,body.company-desk-shell){
  --rx-responsive-gutter:clamp(10px,2vw,24px);
  --rx-responsive-gap:clamp(8px,1.5vw,16px);
  max-width:100%!important;
  overflow-x:clip!important;
}
:is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page),
:is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page)>*{
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:100%!important;
}
:is(body.rx-role-shell,body.clean-admin-shell,body.staff-desk-shell,body.company-desk-shell) :is(img,svg,video,canvas,iframe){
  max-width:100%!important;
}
:is(body.rx-role-shell,body.clean-admin-shell,body.staff-desk-shell,body.company-desk-shell) :is(input,select,textarea){
  box-sizing:border-box!important;
  max-width:100%!important;
  min-width:0!important;
}
:is(body.rx-role-shell,body.clean-admin-shell,body.staff-desk-shell,body.company-desk-shell) input[type="file"]{
  width:100%!important;
  overflow:hidden!important;
}
:is(body.rx-role-shell,body.clean-admin-shell,body.staff-desk-shell,body.company-desk-shell) :is(h1,h2,h3,h4,p,label,strong,small,span,td,th,dd,dt){
  min-width:0!important;
  overflow-wrap:anywhere;
}

/* Headings/action bars must wrap instead of pushing cards outside the viewport. */
:is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page)
:is(.page-head,.page-hero,.module-hero,.section-head,.panel-head,.panel-title-row,.rxui-panel-head,.rxui-hero,.rx-page-hero,.rx-wf-header,.rx-action-hero,.rx-control-hero,.clean-admin-hero,.staff-hero,.company-hero,.rxad-card-head,.opdops-card-head,.rxhr-head,.rxas-head){
  min-width:0!important;
  max-width:100%!important;
}
:is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page)
:is(.hero-actions,.actions,.inline-action,.rx-hero-buttons,.rxui-actions,.rxad-actions,.rxad-card-actions,.opdops-actions,.panel-actions,.company-actions,.staff-actions,.rx-action-row){
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
  max-width:100%!important;
}
:is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page)
:is(.hero-actions,.actions,.inline-action,.rx-hero-buttons,.rxui-actions,.rxad-actions,.rxad-card-actions,.opdops-actions,.panel-actions,.company-actions,.staff-actions,.rx-action-row)>:is(a,button,form,label){
  min-width:0!important;
  max-width:100%!important;
}

/* Generic cards/panels are allowed to shrink. Dropdowns are not clipped. */
:is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page)
:is(.card,.stack-card,.clean-panel,.panel,.panel-card,.rxui-panel,.rxui-action-card,.rxui-kpi,.rxad-card,.opdops-card,.company-panel,.dashboard-card,.growth-card,.rx-admin-panel,.rx-wallet-panel,.rx-rmp-com-card,.metric-card,.metric){
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:100%!important;
}

/* Dense tables scroll inside their own panel; they must never widen the page. */
:is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page)
:is(.table-wrap,.clean-table-wrap,.rx-table-wrap,.it-table-wrap,.rx-table-scroll,.data-table-wrap,.table-responsive){
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-inline:contain!important;
}
:is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page)
:is(.table-wrap,.clean-table-wrap,.rx-table-wrap,.it-table-wrap,.rx-table-scroll,.data-table-wrap,.table-responsive)>table{
  max-width:none!important;
}
:is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page)
table :is(th,td){
  vertical-align:top!important;
}

/* Dialogs and popovers remain inside the current visual viewport. */
:is(body.rx-role-shell,body.clean-admin-shell,body.staff-desk-shell,body.company-desk-shell) :is(dialog,[role="dialog"],.modal,.rx-modal,.rxui-modal,.rxad-modal,.opdops-modal){
  box-sizing:border-box!important;
  max-width:calc(100vw - 20px)!important;
  max-height:calc(100dvh - 20px)!important;
}
:is(body.rx-role-shell,body.clean-admin-shell,body.staff-desk-shell,body.company-desk-shell) :is(dialog,[role="dialog"],.modal,.rx-modal,.rxui-modal,.rxad-modal,.opdops-modal)>*{
  max-width:100%!important;
}

/* Authenticated role drawer: 58vw was too narrow for long Doctor/Assistant/
   Pharmacy labels. Use an accessible overlay width while keeping page visible. */
@media(max-width:860px){
  body.rx-role-shell .rx-role-sidebar{
    width:min(86vw,320px)!important;
    max-width:min(86vw,320px)!important;
    min-width:min(270px,86vw)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  body.rx-role-shell .rx-role-navigation,
  body.rx-role-shell .rx-role-nav-group,
  body.rx-role-shell .rx-role-nav-group>a{min-width:0!important;max-width:100%!important}
  body.rx-role-shell .rx-role-nav-group>a{align-items:center!important}
  body.rx-role-shell .rx-role-nav-group>a>strong{
    white-space:normal!important;
    line-height:1.2!important;
    overflow-wrap:anywhere!important;
  }
  body.clean-admin-shell .clean-admin-sidebar,
  body.staff-desk-shell .staff-sidebar{
    width:min(88vw,330px)!important;
    max-width:min(88vw,330px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  body.clean-admin-shell .clean-admin-nav,
  body.staff-desk-shell .staff-nav{min-width:0!important;max-width:100%!important}
}

/* Tablet: cap common dashboard grids to two usable columns. */
@media(min-width:641px) and (max-width:980px){
  body.rx-role-shell .rx-role-main :is(.form-grid.two,.form-grid.four,.rx-grid,.grid.two,.grid.four,.rxui-grid,.rxui-kpi-grid,.metric-grid,.growth-grid,.rxas-grid,.company-grid,.opdops-grid,.rxad-grid),
  body.clean-admin-shell .clean-admin-page :is(.form-grid.two,.form-grid.four,.rx-grid,.grid.two,.grid.four,.metric-grid,.clean-admin-metrics),
  body.staff-desk-shell .staff-page :is(.form-grid.two,.form-grid.four,.rx-grid,.grid.two,.grid.four,.metric-grid,.growth-grid),
  body.company-desk-shell .company-page :is(.form-grid.two,.form-grid.four,.rx-grid,.grid.two,.grid.four,.metric-grid,.company-grid){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* Phone: forms, cards and actions become one readable column. */
@media(max-width:640px){
  :is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page){
    padding-left:10px!important;
    padding-right:10px!important;
  }
  body.rx-role-shell .rx-role-main :is(.form-grid,.form-grid.two,.form-grid.four,.rx-grid,.grid.two,.grid.four,.rxui-grid,.rxui-kpi-grid,.metric-grid,.growth-grid,.rxas-grid,.company-grid,.opdops-grid,.rxad-grid),
  body.clean-admin-shell .clean-admin-page :is(.form-grid,.form-grid.two,.form-grid.four,.rx-grid,.grid.two,.grid.four,.metric-grid,.clean-admin-metrics),
  body.staff-desk-shell .staff-page :is(.form-grid,.form-grid.two,.form-grid.four,.rx-grid,.grid.two,.grid.four,.metric-grid,.growth-grid),
  body.company-desk-shell .company-page :is(.form-grid,.form-grid.two,.form-grid.four,.rx-grid,.grid.two,.grid.four,.metric-grid,.company-grid){
    grid-template-columns:minmax(0,1fr)!important;
  }
  :is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page)
  :is(.page-head,.page-hero,.module-hero,.section-head,.panel-head,.panel-title-row,.rxui-panel-head,.rxui-hero,.rx-page-hero,.rx-wf-header,.rx-action-hero,.rx-control-hero,.clean-admin-hero,.staff-hero,.company-hero,.rxad-card-head,.opdops-card-head,.rxhr-head,.rxas-head){
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:8px!important;
  }
  :is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page)
  :is(.hero-actions,.actions,.inline-action,.rx-hero-buttons,.rxui-actions,.rxad-actions,.rxad-card-actions,.opdops-actions,.panel-actions,.company-actions,.staff-actions,.rx-action-row)>:is(a,button,form){
    flex:1 1 auto!important;
  }
  :is(body.rx-role-shell .rx-role-main,body.clean-admin-shell .clean-admin-page,body.staff-desk-shell .staff-page,body.company-desk-shell .company-page)
  :is(.hero-actions,.actions,.rx-hero-buttons,.rxui-actions,.rxad-actions,.opdops-actions)>:is(a,button){
    min-height:40px!important;
    justify-content:center!important;
    text-align:center!important;
  }
  :is(body.rx-role-shell,body.clean-admin-shell,body.staff-desk-shell,body.company-desk-shell) :is(input,select,textarea){
    font-size:16px;
  }
}

/* Small phones: preserve the centre logo and stop right-side actions from
   consuming the page-title area. Text labels collapse, icons remain. */
@media(max-width:430px){
  body.rx-role-shell .rx-role-topbar.rxopd-rounded-header{
    grid-template-columns:minmax(44px,1fr) auto minmax(44px,1fr)!important;
  }
  body.rx-role-shell .rx-role-header-left .rx-role-page-title{max-width:88px!important}
  body.rx-role-shell .rx-role-header-left .rx-role-page-title strong{font-size:10.5px!important}
  body.rx-role-shell .rx-role-top-actions{gap:4px!important}
  body.rx-role-shell .rxopd-header-logout button span{display:none!important}
  body.rx-role-shell .rxopd-module-switch a{padding-left:6px!important;padding-right:6px!important;font-size:8.5px!important}
  body.clean-admin-shell .clean-admin-topbar>div,
  body.staff-desk-shell .staff-topbar-title{min-width:0!important;overflow:hidden!important}
  body.clean-admin-shell .clean-admin-topbar>div strong,
  body.staff-desk-shell .staff-topbar-title strong{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  body.clean-admin-shell .clean-admin-topbar .rx-top-notification-label{display:none!important}
  body.clean-admin-shell .clean-admin-logout button,
  body.staff-desk-shell .staff-topbar form button{padding-left:8px!important;padding-right:8px!important}
}


/* 2026-09 shell correction: keep notifications/logout in the top bar,
   keep public Login beside the hamburger, and use narrower nonblocking drawers. */
body.rx-standard-shell .rx-public-guest-header{align-items:center!important}
body.rx-standard-shell .rx-public-guest-header .rx-public-guest-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;margin-left:auto!important;min-width:0!important}
body.rx-standard-shell .rx-public-guest-header .rx-mobile-login-outside{display:inline-flex!important;align-items:center!important;justify-content:center!important;margin:0!important;min-height:40px!important;padding:0 16px!important;border-radius:12px!important;background:linear-gradient(135deg,#08a66f,#07965f)!important;color:#fff!important;font-weight:850!important;white-space:nowrap!important;text-decoration:none!important}
body.rx-standard-shell .rx-public-guest-header .rx-public-menu-button.rx-public-menu-button-custom{display:inline-flex!important;margin:0!important;flex:0 0 auto!important}
@media(min-width:721px){
  body.rx-standard-shell .rx-public-guest-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important;padding-right:12px!important}
  body.rx-standard-shell .rx-public-guest-header .rx-brand{grid-column:1!important;grid-row:1!important;justify-self:start!important}
  body.rx-standard-shell .rx-public-guest-header .rx-public-guest-actions{grid-column:2!important;grid-row:1!important}
  body.rx-standard-shell .rx-public-drawer{display:block!important;width:min(278px,27vw)!important;max-width:278px!important}
  body.rx-standard-shell .rx-public-menu-backdrop{display:block!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;transition:opacity .18s ease,visibility .18s ease!important}
  body.rx-standard-shell.rx-public-menu-open .rx-public-menu-backdrop{opacity:1!important;visibility:visible!important;pointer-events:auto!important}
}
@media(max-width:720px){
  body.rx-standard-shell .rx-public-guest-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;padding-right:10px!important}
  body.rx-standard-shell .rx-public-guest-header .rx-brand{min-width:0!important;justify-self:start!important}
  body.rx-standard-shell .rx-public-guest-header .rx-public-guest-actions{justify-self:end!important;gap:7px!important}
  body.rx-standard-shell .rx-public-guest-header .rx-mobile-login-outside{min-height:38px!important;padding:0 13px!important;font-size:12px!important}
}

/* Top-corner notification and logout are the single source of truth on all authenticated shells. */
@media(max-width:860px){
  body.rx-role-shell .rx-role-sidebar{width:min(66vw,260px)!important;max-width:min(66vw,260px)!important;min-width:min(224px,66vw)!important}
  body.clean-admin-shell .clean-admin-sidebar,body.staff-desk-shell .staff-sidebar{width:min(68vw,266px)!important;max-width:min(68vw,266px)!important;min-width:min(226px,68vw)!important}
  body.rx-role-shell .rx-role-top-actions .rxopd-bell-button,
  body.rx-role-shell .rx-role-top-actions .rxopd-header-logout,
  body.clean-admin-shell .clean-admin-topbar>.rx-top-notification-link,
  body.clean-admin-shell .clean-admin-topbar>.clean-admin-logout,
  body.staff-desk-shell .staff-topbar>.rx-top-notification-link,
  body.staff-desk-shell .staff-topbar>form{display:flex!important}
  body.rx-role-shell .rx-role-top-actions{display:flex!important;margin-left:auto!important;gap:5px!important;align-items:center!important}
  body.clean-admin-shell .clean-admin-topbar>.rx-top-notification-link,
  body.clean-admin-shell .clean-admin-topbar>.clean-admin-logout,
  body.staff-desk-shell .staff-topbar>.rx-top-notification-link,
  body.staff-desk-shell .staff-topbar>form{flex:0 0 auto!important}
  body.clean-admin-shell .clean-admin-topbar>.rx-top-notification-link,
  body.staff-desk-shell .staff-topbar>.rx-top-notification-link{min-height:34px!important;padding:0 9px!important;border-radius:10px!important;font-size:10.5px!important;white-space:nowrap!important}
  body.clean-admin-shell .clean-admin-logout button,
  body.staff-desk-shell .staff-topbar>form button{min-height:34px!important;padding:0 9px!important;border-radius:10px!important;font-size:10.5px!important;white-space:nowrap!important}
}
@media(max-width:430px){
  body.rx-role-shell .rx-role-sidebar{width:min(64vw,244px)!important;max-width:min(64vw,244px)!important;min-width:min(218px,64vw)!important}
  body.clean-admin-shell .clean-admin-sidebar,body.staff-desk-shell .staff-sidebar{width:min(66vw,250px)!important;max-width:min(66vw,250px)!important;min-width:min(220px,66vw)!important}
  body.clean-admin-shell .clean-admin-topbar>.rx-top-notification-link{min-width:34px!important;padding:0 7px!important}
  body.clean-admin-shell .clean-admin-topbar>.clean-admin-logout button,
  body.staff-desk-shell .staff-topbar>form button{padding:0 7px!important}
}

/* Testing keeps only End Testing in the drawer; notification/logout remain in the top bar. */
.rx-sidebar-testing-actions{flex:0 0 auto;padding:8px 10px 12px;margin-top:auto;background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.96) 28%)}
.rx-sidebar-testing-actions form{margin:0!important}.rx-sidebar-testing-actions button{width:100%;min-height:40px;border:1px solid #fecaca;border-radius:11px;background:#fff2f2;color:#a21c1c;font:inherit;font-weight:850;cursor:pointer}
body.rx-role-shell .rx-role-sidebar .rx-role-navigation,body.clean-admin-shell .clean-admin-sidebar .clean-admin-nav,body.staff-desk-shell .staff-sidebar .staff-nav{flex:1 1 auto;min-height:0;overflow-y:auto!important}

/* Public drawer follows the same compact-width rule. */
@media(max-width:860px){
  body.rx-standard-shell .rx-public-drawer{width:min(66vw,258px)!important;max-width:min(66vw,258px)!important;min-width:min(218px,66vw)!important}
}
@media(max-width:430px){
  body.rx-standard-shell .rx-public-drawer{width:min(64vw,244px)!important;max-width:min(64vw,244px)!important;min-width:min(212px,64vw)!important}
}


/* 2026-09 continuation: authenticated standard shell keeps notification/logout
   in the top bar, not inside the drawer. This also covers OTP-verified provider
   drafts and KYC/status pages that do not yet have an active portal role. */
body.rx-standard-shell.rx-authenticated .rx-public-drawer .rx-public-drawer-form{display:none!important}
body.rx-standard-shell.rx-authenticated .rx-topnav{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;min-width:0!important;margin-left:auto!important}
body.rx-standard-shell.rx-authenticated .rx-standard-auth-notification,
body.rx-standard-shell.rx-authenticated .rx-standard-auth-logout{display:inline-flex!important;flex:0 0 auto!important}
body.rx-standard-shell.rx-authenticated .rx-standard-auth-logout{margin:0!important}
body.rx-standard-shell.rx-authenticated .rx-standard-auth-logout button,
body.rx-standard-shell.rx-authenticated .rx-standard-auth-notification{min-height:38px!important;padding:0 11px!important;border-radius:11px!important;font-size:11px!important;white-space:nowrap!important}
body.rx-standard-shell.rx-authenticated .rx-page{font-size:13px!important}
body.rx-standard-shell.rx-authenticated .rx-page h1{font-size:clamp(18px,2.3vw,24px)!important;line-height:1.12!important}
body.rx-standard-shell.rx-authenticated .rx-page h2{font-size:clamp(15px,1.8vw,19px)!important;line-height:1.17!important}
body.rx-standard-shell.rx-authenticated .rx-page h3{font-size:14px!important;line-height:1.2!important}
body.rx-standard-shell.rx-authenticated .rx-page :is(p,li,td,th,label,span){line-height:1.38}
@media(max-width:760px){
  body.rx-standard-shell.rx-authenticated .rx-topbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;gap:6px!important;padding:0 8px!important;height:58px!important;min-height:58px!important}
  body.rx-standard-shell.rx-authenticated .rx-brand{min-width:0!important;overflow:hidden!important}
  body.rx-standard-shell.rx-authenticated .rx-brand img{max-width:112px!important}
  body.rx-standard-shell.rx-authenticated .rx-topnav{grid-column:2!important;grid-row:1!important;gap:5px!important;flex-wrap:nowrap!important}
  body.rx-standard-shell.rx-authenticated .rx-standard-auth-secondary{display:none!important}
  body.rx-standard-shell.rx-authenticated .rx-standard-auth-notification{display:inline-flex!important;min-height:34px!important;padding:0 8px!important;font-size:10px!important}
  body.rx-standard-shell.rx-authenticated .rx-standard-auth-logout{display:inline-flex!important}
  body.rx-standard-shell.rx-authenticated .rx-standard-auth-logout button{display:inline-flex!important;min-height:34px!important;padding:0 8px!important;font-size:10px!important}
  body.rx-standard-shell.rx-authenticated .rx-public-menu-button{grid-column:3!important;grid-row:1!important;display:inline-grid!important;width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;margin:0!important}
  body.rx-standard-shell.rx-authenticated .rx-page{padding-top:68px!important;font-size:12.5px!important}
}
@media(max-width:430px){
  body.rx-standard-shell.rx-authenticated .rx-topbar{grid-template-columns:minmax(0,1fr) auto auto!important;padding-inline:6px!important}
  body.rx-standard-shell.rx-authenticated .rx-standard-auth-notification{max-width:86px!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.rx-standard-shell.rx-authenticated .rx-standard-auth-logout button{padding-inline:7px!important}
}


/* 2026-09 exact public-header correction: logo left, Login + hamburger together at far right.
   The hamburger itself becomes the red close control while the drawer is open. */
body.rx-standard-shell .rx-public-guest-header{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-rows:1fr!important;
  align-items:center!important;
  column-gap:10px!important;
}
body.rx-standard-shell .rx-public-guest-header .rx-brand,
body.rx-standard-shell .rx-public-guest-header .rx-logo-brand{
  grid-column:1!important;
  grid-row:1!important;
  justify-self:start!important;
  min-width:0!important;
}
body.rx-standard-shell .rx-public-guest-header .rx-public-guest-actions{
  grid-column:2!important;
  grid-row:1!important;
  justify-self:end!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:nowrap!important;
  gap:8px!important;
  width:auto!important;
  margin:0!important;
}
body.rx-standard-shell .rx-public-guest-header .rx-mobile-login-outside{
  order:1!important;
  grid-column:auto!important;
  grid-row:auto!important;
  margin:0!important;
  flex:0 0 auto!important;
}
body.rx-standard-shell .rx-public-guest-header .rx-public-menu-button.rx-public-menu-button-custom.rx-shell-hamburger{
  order:2!important;
  grid-column:auto!important;
  grid-row:auto!important;
  justify-self:auto!important;
  margin:0!important;
  flex:0 0 auto!important;
}
body.rx-standard-shell .rx-public-guest-header .rx-public-menu-button.rx-public-menu-button-custom.rx-shell-hamburger[aria-expanded="true"],
body.rx-standard-shell.rx-public-menu-open .rx-public-guest-header .rx-public-menu-button.rx-public-menu-button-custom.rx-shell-hamburger{
  background:#fff1f2!important;
  color:#dc2626!important;
  border-color:#fecaca!important;
  box-shadow:0 8px 20px rgba(220,38,38,.16)!important;
}
body.rx-standard-shell.rx-public-menu-open .rx-public-guest-header .rx-public-menu-button.rx-public-menu-button-custom.rx-shell-hamburger>span{
  background:currentColor!important;
}

/* The same header drawer must work on desktop/tablet as well as phone. */
@media(min-width:721px){
  body.rx-standard-shell .rx-public-guest-header .rx-mobile-login-outside,
  body.rx-standard-shell .rx-public-guest-header .rx-public-menu-button{display:inline-flex!important}
  body.rx-standard-shell .rx-public-menu-backdrop{
    display:block!important;
    position:fixed!important;
    top:68px!important;
    right:0!important;
    bottom:0!important;
    left:0!important;
    z-index:1120!important;
    background:rgba(8,24,58,.38)!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transition:opacity .18s ease,visibility .18s ease!important;
  }
  body.rx-standard-shell .rx-public-drawer{
    display:flex!important;
    position:fixed!important;
    top:68px!important;
    right:8px!important;
    bottom:8px!important;
    left:auto!important;
    width:min(278px,27vw)!important;
    max-width:278px!important;
    height:auto!important;
    z-index:1140!important;
    flex-direction:column!important;
    overflow:auto!important;
    padding:14px!important;
    border:1px solid #d8e6f6!important;
    border-radius:18px 0 0 18px!important;
    background:#fff!important;
    box-shadow:-16px 16px 42px rgba(8,36,92,.22)!important;
    transform:translate3d(112%,0,0)!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transition:transform .2s ease,visibility .2s ease!important;
  }
  body.rx-standard-shell.rx-public-menu-open .rx-public-menu-backdrop{
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
  body.rx-standard-shell.rx-public-menu-open .rx-public-drawer{
    transform:translate3d(0,0,0)!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
}
@media(max-width:720px){
  body.rx-standard-shell .rx-public-guest-header{
    grid-template-columns:minmax(0,1fr) auto!important;
    padding-left:9px!important;
    padding-right:9px!important;
  }
  body.rx-standard-shell .rx-public-guest-header .rx-public-guest-actions{gap:7px!important}
}


/* 2026-09-02 public header hard lock: brand left, Login + hamburger at physical far right. */
body.rx-standard-shell header.rx-topbar.rx-hanging-header.rx-public-guest-header{
  width:calc(100% - 16px)!important;max-width:none!important;margin-left:8px!important;margin-right:8px!important;display:grid!important;grid-template-columns:minmax(0,1fr) max-content!important;
}
body.rx-standard-shell header.rx-topbar.rx-hanging-header.rx-public-guest-header .rx-public-guest-actions{grid-column:2!important;justify-self:end!important;margin-left:auto!important;width:max-content!important;}
body.rx-standard-shell header.rx-topbar.rx-hanging-header.rx-public-guest-header .rx-mobile-login-outside{order:1!important;}
body.rx-standard-shell header.rx-topbar.rx-hanging-header.rx-public-guest-header .rx-public-menu-button{order:2!important;}
