/* Phone-only patient list and chart. Desktop patient rails keep their layout. */
@media screen and (max-width:720px){
 .shell:has(.mobile-patient-reference-list) .topbar,.shell:has(.mobile-patient-reference-profile) .topbar,.shell:has(.mobile-patient-reference-list) .patient-management-nav,.shell:has(.mobile-patient-reference-profile) .patient-management-nav,.shell:has(.mobile-patient-reference-list) .mobile-bottom,.shell:has(.mobile-patient-reference-profile) .mobile-bottom{display:none!important}
 .shell:has(.mobile-patient-reference-list) .main,.shell:has(.mobile-patient-reference-profile) .main{padding:0 0 env(safe-area-inset-bottom)!important;background:#fff}
 .mobile-patient-reference-list{padding:0 15px;background:#fff;color:#43484e}
 .patient-workspace.mobile-patient-reference-list>.pagehead{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:0;align-items:center;margin:0;padding:calc(6px + env(safe-area-inset-top)) 0 7px;min-height:52px;border:0;background:#fff}
 .mobile-patient-reference-list>.pagehead>div{grid-column:2;grid-row:1;min-width:0;text-align:center}.mobile-patient-reference-list>.pagehead>.mobile-patient-list-back{grid-column:1;grid-row:1}.mobile-patient-reference-list>.pagehead>#new-patient{grid-column:3;grid-row:1}.mobile-patient-reference-list>.pagehead>[data-patient-history-entry]{display:none!important}.mobile-patient-reference-list>.pagehead .subtle{display:none}
 .mobile-patient-reference-list>.pagehead h1{font-size:18px;font-weight:600;color:#363b40}
 .mobile-patient-reference-list>.pagehead .mobile-patient-list-back{font-size:31px;font-weight:300;color:#52585e;padding:0;border:0;background:transparent;min-width:44px;min-height:44px;text-align:left}
 .mobile-patient-reference-list>.pagehead #new-patient{font-size:29px;font-weight:300;min-width:44px;min-height:44px;padding:0;border:0;background:transparent;color:#0bb3c5;text-align:right}
 .patient-workspace.mobile-patient-reference-list .patient-searchbar{gap:7px;padding:0 0 6px;border-bottom:1px solid #f0f1f3}
 .patient-workspace.mobile-patient-reference-list .patient-searchbar>#patient-search{background:#f5f5f6;border-radius:22px;padding:9px 13px;font-size:12px}
 .patient-workspace.mobile-patient-reference-list .patient-result-toolbar{gap:6px;min-height:44px;padding:0;font-size:11px}.mobile-patient-reference-list .patient-result-toolbar>strong{font-size:11px!important}
 .patient-workspace.mobile-patient-reference-list .mobile-patient-batch-toggle{min-width:44px;min-height:44px;padding:6px 8px}
 .patient-workspace.mobile-patient-reference-list .mobile-patient-reference-card{padding:10px 0 7px;border-bottom:1px solid #f0f1f3}
 .patient-workspace.mobile-patient-reference-list .mobile-patient-reference-card .mobile-patient-main{position:relative;display:flex;flex-direction:column;padding:0 0 0 57px!important;min-height:56px;color:#9da2a8}
 .mobile-patient-reference-card .mobile-patient-main>.mobile-patient-avatar{position:absolute;left:0;top:2px;display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:#f2f7f8;color:#42aebd;font-style:normal}
 .mobile-patient-reference-card>.patient-source-doctors,.mobile-patient-reference-card>.patient-source-mrn{display:none}.mobile-patient-avatar>img{display:block;width:100%;height:100%;object-fit:contain;border-radius:50%}.mobile-patient-avatar>.feature-symbol{display:block;width:25px;height:25px}.mobile-patient-reference-card .mobile-patient-main>strong{order:0;margin:0 0 3px!important;font-size:15px!important;font-weight:550!important;line-height:1.5;color:#42484d!important}
 .mobile-patient-reference-card .mobile-patient-main>strong small{font-size:12px!important;color:#636b72!important}
 .mobile-patient-reference-card .mobile-patient-sex{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;order:1;width:15px;height:15px;line-height:15px;border-radius:50%;font-size:12px;background:#eef0f2;color:#89929a;margin:0 0 4px}
 .mobile-patient-reference-card .mobile-patient-sex.male{background:#e6f2ff;color:#53a1ef}.mobile-patient-reference-card .mobile-patient-sex.female{background:#ffe9f1;color:#ef85aa}
 .patient-workspace.mobile-patient-reference-list .mobile-patient-compact-meta{order:2;display:block}
 .patient-workspace.mobile-patient-reference-list .mobile-patient-compact-meta>span{display:block;font-size:11px;line-height:1.8;color:#9b9fa4}
 .mobile-patient-reference-meta{order:3;display:flex;flex-direction:column}.mobile-patient-reference-meta>span{font-size:11px!important;line-height:1.8!important;color:#9b9fa4!important}
 .patient-workspace.mobile-patient-reference-list .mobile-patient-reference-card .patient-row-actions{display:flex;justify-content:flex-end;gap:10px;padding-left:57px;margin:9px 0 0}
 .patient-workspace.mobile-patient-reference-list .mobile-patient-reference-card .patient-row-actions>button{flex:1;min-width:0;width:auto;max-width:100px;min-height:35px;padding:6px 9px;border:1px solid #edf0f2;border-radius:22px;background:#fff;color:#8b9198;font-size:12px;font-weight:400}
 .patient-workspace.mobile-patient-reference-list .mobile-patient-reference-card .patient-row-actions:empty{display:none}
 .patient-workspace.mobile-patient-reference-list .mobile-patient-inline-more>summary{min-height:29px;padding:5px 0;font-size:10px;color:#a1a7ad}
 .patient-workspace.mobile-patient-reference-list .mobile-patient-inline-more .mobile-patient-safety-hint{font-size:10px;color:#ac916c;max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .mobile-patient-reference-profile{min-height:100dvh;background:#fff;color:#43494f}
 .mobile-patient-reference-profile>.recent-patients,.mobile-patient-reference-profile>.patient-context-header,.mobile-patient-reference-profile>.tabs{display:none!important}
 .mobile-patient-page-header{position:sticky;top:0;z-index:16;display:grid;grid-template-columns:60px minmax(0,1fr) 60px;align-items:center;gap:0;min-height:54px;padding:calc(4px + env(safe-area-inset-top)) 15px 5px;border-bottom:1px solid #f0f2f4;background:#fff}
 .mobile-patient-page-header h1{margin:0;text-align:center;font-size:17px;font-weight:550;color:#363c42}
 .mobile-patient-page-header>button{min-width:44px;min-height:44px;padding:8px 0;border:0;border-radius:0;background:#fff;color:#11aabd;font-size:13px;text-align:right}
 .mobile-patient-page-header>[data-mobile-patient-back]{font-size:31px;font-weight:300;color:#596068;text-align:left}
 .mobile-patient-page-header>[data-mobile-patient-plus]{font-size:29px;font-weight:300;line-height:1;color:#19afc1;min-width:44px}
 .mobile-patient-quick-menu[hidden]{display:none!important}.mobile-patient-quick-menu{position:absolute;right:15px;top:calc(100% - 3px);z-index:30;width:124px;min-width:124px;max-width:calc(100vw - 30px);max-height:70dvh;overflow:visible;padding:4px 0;border:0;border-radius:5px;background:#293a46;box-shadow:0 5px 16px #1f29332a;color:#fff;text-align:left}
 .mobile-patient-quick-menu::before{content:'';position:absolute;right:10px;top:-7px;border-width:0 7px 7px;border-style:solid;border-color:transparent transparent #293a46}
 .mobile-patient-quick-menu>[role=menuitem]{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;box-sizing:border-box;margin:0;padding:9px 12px;border:0;border-bottom:1px solid #ffffff14;border-radius:0;background:transparent;color:#fff;font-size:13px;font-weight:400;line-height:1.45;text-align:left;white-space:nowrap}
 .mobile-patient-quick-menu>[role=menuitem] .feature-symbol,.mobile-patient-quick-menu>[role=menuitem] .app-icon{width:18px;height:18px;flex:0 0 18px;color:#fff}
 .mobile-patient-quick-menu>[role=menuitem]:last-child{border-bottom:0}.mobile-patient-quick-menu>[role=menuitem]:active,.mobile-patient-quick-menu>[role=menuitem]:focus-visible{background:#3c5261;outline:0}
 .mobile-patient-reference-profile #patient-body{padding:0 15px 12px;min-width:0}
 .mobile-patient-identity{padding:12px 0 10px;border-bottom:7px solid #fafafa}
 .mobile-patient-identity-main{position:relative;display:grid;grid-template-columns:45px minmax(0,1fr);gap:12px;align-items:start;padding-right:45px}
 .mobile-patient-identity-main>[data-mobile-patient-identity-edit]{position:absolute;right:0;top:-3px;min-width:44px;min-height:35px;padding:6px 0;border:0;border-radius:0;background:#fff;color:#9ba1a7;font-size:12px;font-weight:400;white-space:nowrap;text-align:right}
 .mobile-patient-identity-main>.mobile-patient-avatar{display:flex;align-items:center;justify-content:center;width:43px;height:43px;border-radius:50%;background:#f1f7f8;color:#42aebd}
 .mobile-patient-identity-main strong{display:block;font-size:15px;font-weight:550;margin:0 0 4px;color:#41474d}.mobile-patient-identity-main strong small{font-size:12px;font-weight:400;color:#7a8188}
 .mobile-patient-identity-main .mobile-patient-sex{font-size:15px;color:#9199a2}.mobile-patient-identity-main .mobile-patient-sex.male{color:#55a2ee}.mobile-patient-identity-main .mobile-patient-sex.female{color:#ee8aac}
 .mobile-patient-identity-main p{margin:3px 0;color:#979da4;font-size:11px;line-height:1.55;overflow-wrap:anywhere}
 .mobile-patient-allergy{margin:8px 0 0;padding:0 0 0 57px;color:#ad8251;font-size:11px;line-height:1.6}.mobile-patient-allergy strong{margin-right:8px;font-weight:500}.mobile-patient-allergy.subtle{color:#aaaeb3}
 .mobile-patient-daily-actions{display:flex;justify-content:flex-end;gap:10px;padding-left:57px;margin-top:13px}.mobile-patient-daily-actions>button{flex:1;max-width:100px;min-height:35px;padding:7px 9px;border:1px solid #eaf0f2;border-radius:22px;background:#fff;font-size:12px;font-weight:400;color:#83929a}
 .mobile-patient-function-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:12px 0 14px;border-bottom:7px solid #fafafa}
 .mobile-patient-function-grid>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:76px;padding:8px 3px;border:0;border-radius:0;box-shadow:none;background:#fff;color:#3f454b;font-size:13px;font-weight:400}
 .mobile-patient-function-grid>button>.feature-symbol{width:24px;height:24px;color:#3f454b}.mobile-patient-function-grid>button>span:last-child{color:#555c63;font-size:13px;line-height:1.5}
 .mobile-patient-function-grid>[data-mobile-patient-function="plan"]>.feature-symbol{--feature-mask:url("/static/assets/icons/regular/list-checks.svg")}
 .mobile-patient-function-grid>[data-mobile-patient-function="oral_exam"]>.feature-symbol{--feature-mask:url("/static/assets/icons/regular/magnifying-glass.svg")}
 .mobile-patient-more-records{margin:0;border-bottom:7px solid #fafafa}.mobile-patient-more-records>summary{padding:14px 0;min-height:44px;box-sizing:border-box;font-size:13px;color:#8a9299;cursor:pointer}.mobile-patient-more-records>.mobile-patient-function-grid{padding-top:0;border-bottom:0} .mobile-patient-function-grid>button:active{background:#f6fcfd}.mobile-patient-phone-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:58px;padding:10px 0;color:#9ca3a9;font-size:12px}.mobile-patient-phone-footer a{color:#56a8bb;text-decoration:none;font-size:14px}
 .mobile-patient-info-panel dl{margin:0}.mobile-patient-info-panel dl>div{display:grid;grid-template-columns:103px minmax(0,1fr);gap:15px;padding:12px 0;border-bottom:1px solid #f0f3f4;font-size:13px;line-height:1.65}.mobile-patient-info-panel dt{color:#9ba2a9}.mobile-patient-info-panel dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;color:#65717a}.mobile-patient-info-tools{display:flex;flex-wrap:wrap;gap:8px;padding:18px 0}.mobile-patient-info-tools>button{min-height:40px;border-color:#e0edf0;background:#fff;color:#4e9db0;font-size:12px}
 .mobile-patient-reference-profile:has(.patient-billing) .patient-billing-overview{margin:0 -15px 14px;padding:18px 17px;background:linear-gradient(112deg,#19c2c8,#25aadd);border:0;border-radius:0;color:#fff}
 .mobile-patient-reference-profile .patient-billing-overview-title{display:none}.mobile-patient-reference-profile .patient-billing-amounts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0}
 .mobile-patient-reference-profile .patient-billing-amounts>div:first-child{display:none}.mobile-patient-reference-profile .patient-billing-amounts>div{padding:0 15px;border:0;background:transparent;border-radius:0}.mobile-patient-reference-profile .patient-billing-amounts>div:nth-child(2){border-right:1px solid #ffffff61}
 .mobile-patient-reference-profile .patient-billing-amounts>div>span,.mobile-patient-reference-profile .patient-billing-amounts>div>strong{color:#fff!important}.mobile-patient-reference-profile .patient-billing-amounts>div>span{font-size:11px}.mobile-patient-reference-profile .patient-billing-amounts>div>strong{font-size:24px;font-weight:400}.mobile-patient-reference-profile .patient-billing-history-hint{display:block;margin:14px 8px 0;color:#edfcff;font-size:10px}
 .mobile-patient-reference-profile .patient-billing-toolbar{display:block}.mobile-patient-reference-profile .patient-billing-toolbar>.actions{display:none}.mobile-patient-reference-profile .patient-billing-tabs{border:0}.mobile-patient-reference-profile .patient-billing-tabs>button{min-height:43px;font-size:13px;border:0;background:#fff}.mobile-patient-reference-profile .patient-billing-filterbar{gap:7px}.mobile-patient-reference-profile .patient-billing-filterbar>strong{display:none}
 .mobile-patient-reference-profile .patient-billing-table:has([data-patient-bill-row]),.mobile-patient-reference-profile .patient-billing-table:has([data-patient-bill-row]) tbody{display:block;width:100%;min-width:0}.mobile-patient-reference-profile .patient-billing-table:has([data-patient-bill-row]) thead{display:none}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px 12px;padding:15px 0;border-bottom:1px solid #eef1f3}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td{padding:0!important;border:0!important;font-size:11px;color:#9ba3aa;line-height:1.65;white-space:normal;overflow-wrap:anywhere;min-width:0}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:first-child,.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:nth-child(3),.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:nth-child(6){display:none}
 .mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:nth-child(2){grid-column:1;grid-row:1;font-size:13px;color:#59656e}.mobile-patient-reference-profile .patient-bill-number{padding:0;border:0;background:#fff;color:#65717c;font-size:13px}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:nth-child(4){grid-column:1/-1;grid-row:2}.mobile-patient-reference-profile .patient-billing-time{display:inline-flex;gap:8px;font-size:11px}.mobile-patient-reference-profile .patient-billing-time small{font-size:11px;color:inherit}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:nth-child(5){grid-column:2;grid-row:1;justify-self:end;padding:1px 7px!important;border-radius:10px;background:#edf9f9;color:#5ba5af;font-size:10px}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:nth-child(7){grid-column:1/-1}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:nth-child(7)::before{content:'医生：'}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:nth-child(8)::before{content:'应收：'}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:nth-child(9)::before{content:'实收：'}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:nth-child(10)::before{content:'欠费：'}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:last-child{grid-column:1/-1}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:last-child .actions{gap:14px}.mobile-patient-reference-profile .patient-billing-table [data-patient-bill-row]>td:last-child button{padding:3px 0;border:0;background:#fff;color:#39a4b6;font-size:12px}
 .mobile-patient-reference-profile .patient-billing-scroll{max-width:100%;overflow:auto}.mobile-patient-reference-profile .patient-billing-expanded-row[hidden]{display:none!important}
 .patient-workspace.mobile-patient-reference-list .patient-list-card{padding:0;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff}
 .patient-workspace.mobile-patient-reference-list .patient-center{border:0;background:#fff;gap:0}
 .patient-workspace.mobile-patient-reference-list .mobile-patient-reference-card .mobile-patient-main>strong small{font-size:13px;color:#6d747b}
 .patient-workspace.mobile-patient-reference-list .patient-result-toolbar{display:none!important}
 .mobile-patient-reference-list .mobile-patient-group-menu>.mobile-patient-batch-toggle{display:block;width:100%;min-height:44px;margin:0;padding:10px 14px;border:0;border-top:1px solid #f0f1f3;border-radius:0;background:#fff;color:#6c858e;font-size:13px;text-align:left}
 .patient-workspace.mobile-patient-reference-list>.pagehead{box-sizing:border-box;min-height:44px;height:44px;padding:0}
 .mobile-patient-page-header{box-sizing:border-box;min-height:44px;height:44px;padding:0 15px}
 .mobile-patient-page-header h1,.mobile-patient-reference-list>.pagehead h1{font-size:16px;font-weight:550}
}
