.patient-search{background:#edf2e4;border:1px solid #dce6cf;border-radius:16px;padding:16px;margin-bottom:22px}.patient-search label{font-size:11px;color:#61784d}.patient-search input{background:#fbfdf6;border-radius:10px}.patient-search>small{font-size:9px;display:block;margin-top:9px;line-height:1.6}#patient-matches{display:grid;gap:6px}#patient-matches button{display:flex;justify-content:space-between;gap:12px;align-items:center;text-align:left;background:#fafdf2;border:1px solid #dae4ca;border-radius:11px;padding:11px;margin-top:7px}#patient-matches button:hover{background:#e2ebd3;transform:translateX(2px)}#patient-matches b{font-size:12px;display:block}#patient-matches small{font-size:9px;display:block;margin-top:5px}#patient-matches button>span:last-child{font-size:10px;white-space:nowrap}#patient-matches p{font-size:11px;line-height:1.6;color:#7e8e6b;margin:14px 0 0}.appointment-fields{margin-top:19px}.visit-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:15px 0 22px}.visit-actions button{font-size:11px;border:1px solid #dce5d0;border-radius:20px;padding:10px 14px}.visit-actions button:hover{background:#e8efdc}.visit-actions span{font-size:10px;color:#82916f}#booking-dialog{max-height:90dvh;overflow:auto}
/* Responsive Chrome layout: compact desktop, accessible mobile forms. */
html{scrollbar-gutter:stable;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:0}
#app{min-height:100dvh}
#app main{min-width:0}
header{height:64px;padding-inline:clamp(18px,2.4vw,36px);gap:16px}
header>span,header>div{min-width:0}
header>div{display:flex;align-items:center;gap:8px}
#session-profile{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:8px}
.page{max-width:1600px;padding:24px clamp(18px,2.4vw,36px) 32px}
.page-heading{min-height:146px;padding:24px 28px;border-radius:22px;gap:18px}
.page-heading h1{font-size:clamp(26px,2.4vw,34px);line-height:1.15;margin-bottom:10px}
.page-heading p{max-width:420px;line-height:1.6}
.page-heading .eyebrow{margin-bottom:10px}
.page-heading .primary{align-self:center;min-height:44px}
.stats{gap:12px;margin:16px 0 24px;grid-template-columns:repeat(4,minmax(0,1fr))}
.stats article{padding:16px 18px;border-radius:16px;min-width:0}
.stats strong{font-size:30px;margin:10px 0 5px;line-height:1.15}
.stats small{line-height:1.4}
.desk-toolbar h2{font-size:21px}
.filters{margin-top:18px;gap:14px}
.filters input{min-height:44px}
.tokens{grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:16px;margin-top:20px}
.token,.add-token{min-height:205px;padding:20px;border-radius:20px}
.token h3{font-size:21px;line-height:1.25;margin:24px 0 10px;overflow-wrap:anywhere}
.token p{white-space:normal;line-height:1.6;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.token-number{font-size:30px}
.token-bottom{font-size:11px;padding-top:12px}
.add-token small{line-height:1.5}
footer{margin-top:24px;gap:12px;flex-wrap:wrap;line-height:1.5}
#app aside{height:100dvh;padding:24px 20px;overscroll-behavior:contain}
#app aside .nav-label{margin-top:24px}
#app aside .nav{padding:13px 14px;margin-bottom:6px;min-height:44px}
#app aside .sidebar-bottom{flex-shrink:0;padding-top:18px}
dialog{width:660px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:24px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#booking-dialog,#staff-dialog{max-height:calc(100dvh - 32px)}
.modal-heading{gap:16px;margin-bottom:20px}
.modal-heading h2{font-size:24px;line-height:1.25}
.modal-heading>div{min-width:0}
.icon-button{flex-shrink:0;min-width:40px;min-height:40px}
.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.form-grid label{min-width:0;line-height:1.5}
.form-grid input,.form-grid select,.form-grid textarea,.patient-search input{width:100%;min-height:44px;max-width:100%}
.patient-search{padding:14px;margin-bottom:18px}
.appointment-fields{margin-top:16px}
.modal-actions{position:sticky;bottom:-24px;background:#fafbf6;padding:14px 0 4px;margin-top:16px;z-index:2;align-items:center;flex-wrap:wrap}
.modal-actions .primary{min-height:44px}
.visit-actions{flex-wrap:wrap;margin-bottom:12px}
#report-table{max-width:100%;overscroll-behavior-inline:contain}
#report-table table{min-width:670px}
.profile-layout,.profile-content,.settings-card{min-width:0}
.workspace-heading{margin-top:4px;margin-bottom:24px}
.team-member{min-width:0}
#auth{min-height:calc(100dvh - 32px);margin:16px;border-radius:26px}
.auth-art{min-height:0;padding:36px}
.auth-art h1{margin-top:110px}
.auth-form{width:min(100%,380px);max-width:calc(100% - 48px);padding:36px 0;gap:20px}
.auth-form input{min-height:46px}
#toast{width:max-content;max-width:calc(100vw - 24px);text-align:center;overflow-wrap:anywhere;bottom:max(16px,env(safe-area-inset-bottom))}
@media(min-width:1450px){.tokens{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-height:800px) and (min-width:701px){
 .page{padding-top:20px}.page-heading{min-height:132px;padding-block:22px}
 .stats{margin-bottom:20px}.stats article{padding-block:13px}
 .token,.add-token{min-height:192px}.token h3{margin-top:20px}
 .auth-form{padding-block:24px;gap:16px}.auth-form h2{font-size:29px}
}
@media(max-width:1100px){
 .filters{flex-direction:row;flex-wrap:wrap;align-items:center}
 .tabs{min-width:0;max-width:100%;overflow:auto}
 .filters input{flex:1;min-width:180px}
 .page-heading{min-height:146px}
}
@media(max-width:700px){
 html{scrollbar-gutter:auto}
 #app main{margin-left:0}
 #sidebar-edge{width:8px}
 header{height:60px;padding-inline:14px;gap:8px}
 header>span{font-size:11px}
 #sidebar-toggle{width:40px;height:40px;margin-right:8px;flex-shrink:0}
 #session-profile{max-width:140px;min-height:40px;margin:0;padding:8px 12px}
 .page{padding:16px 14px 24px}
 .page-heading{padding:18px;min-height:0;border-radius:20px;gap:12px}
 .page-heading h1{font-size:26px;letter-spacing:-1px;margin-bottom:8px}
 .page-heading .eyebrow{display:none}
 .page-heading p{font-size:12px;max-width:100%}
 .page-heading .primary{align-self:flex-start;font-size:13px;padding:12px 18px}
 .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0 22px}
 .stats article{padding:15px;border-radius:16px}
 .stats article>span{font-size:12px}
 .stats strong{font-size:29px;margin-block:10px 6px}
 .stats small{font-size:11px}
 .desk-toolbar{gap:14px}
 .desk-toolbar h2{font-size:21px;line-height:1.3}
 .date-controls{max-width:100%;gap:3px}
 .date-controls input{width:0;flex:1;min-width:0;font-size:14px;min-height:42px}
 .date-controls button{min-width:42px;min-height:42px;padding:10px}
 .filters{gap:12px;margin-top:18px}
 .tabs{width:100%;border-radius:16px;-webkit-overflow-scrolling:touch}
 .tabs button{min-height:42px;font-size:12px;padding:10px 13px}
 .filters input{width:100%;flex-basis:100%;font-size:16px}
 .tokens{grid-template-columns:1fr;gap:12px;margin-top:16px}
 .token,.add-token{min-height:184px;padding:20px}
 .token h3{font-size:22px;margin-top:22px}
 .token p{font-size:12px}
 .token-number{font-size:30px}
 .token .status{font-size:11px;padding:7px 10px}
 .token-bottom{font-size:11px}
 .add-token span{font-size:14px}.add-token small{font-size:11px}
 dialog{max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:20px;border-radius:20px}
 #booking-dialog,#staff-dialog{max-height:calc(100dvh - 20px)}
 .modal-heading h2{font-size:22px}.modal-heading .eyebrow{line-height:1.5}
 .modal-actions{bottom:-20px;gap:10px;padding-bottom:8px}
 .form-grid,.settings-card .form-grid{grid-template-columns:1fr;gap:14px}
 .form-grid .full{grid-column:auto}
 .form-grid input,.form-grid select,.form-grid textarea,.patient-search input,.settings-card input{font-size:16px}
 .form-grid label,.patient-search label{font-size:12px}
 .patient-search>small{font-size:11px}
 #staff-permissions{grid-template-columns:1fr}
 .report-controls{align-items:stretch;flex-wrap:wrap}
 .report-controls label,.report-controls .primary{flex:1;min-width:0}
 .report-controls select{min-width:0;width:100%;min-height:44px}
 #auth{margin:10px;min-height:calc(100dvh - 20px);padding:0;border-radius:22px}
 .auth-form{max-width:calc(100% - 40px);padding:32px 0;gap:20px}
 .auth-form h2{font-size:28px}
 .auth-form input{font-size:16px}
 .team-search{flex-wrap:wrap}.team-search input{max-width:100%;flex-basis:100%}
 #identity-permissions{grid-template-columns:1fr}
 footer{font-size:11px}
}
@media(max-width:480px){header .muted,header b{display:none}#session-profile{max-width:142px}.modal-actions .primary{width:100%}.danger{padding:10px 0}.team-overview{grid-template-columns:1fr}.team-overview article{padding:16px}.team-overview strong{margin-block:8px}}
@media(hover:none){.token:hover,.add-token:hover,.stats article:hover,.primary:hover{transform:none}}


/* Staff token picker: availability by doctor/date, including custom numbers. */
.booking-pool-fields{margin-bottom:18px}
.token-picker{padding:18px;border:1px solid #d7e2ca;border-radius:18px;background:#f0f5e9;margin-bottom:20px}
.token-picker-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.token-picker h3{margin:0 0 6px;font-size:17px}.token-picker-heading p{font-size:12px;line-height:1.5;margin:0;color:#617553}
.token-choice{font-size:12px;white-space:nowrap;border-radius:20px;padding:8px 12px;background:#214b36;color:#fff}
.token-choice-conflict{background:#945144}
.token-picker-controls{display:flex;align-items:flex-end;gap:14px;justify-content:space-between}
.token-picker-controls label{flex:1;max-width:230px;min-width:0;font-size:12px}
.token-picker-controls input{width:100%;min-height:44px;background:white;font-size:16px}
.token-page-controls{display:flex;align-items:center;gap:6px;min-width:0}
.token-page-controls button{width:40px;min-height:44px;background:#fff;border:1px solid #d2ddc6;flex-shrink:0}
#token-page-label{font-size:12px;min-width:56px;text-align:center;overflow-wrap:anywhere}
#token-availability-status{font-size:12px;line-height:1.5;color:#586f4b;margin:14px 0}
.token-number-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:7px}
.token-number-option{min-height:44px;padding:6px 2px;background:#fff;border:1px solid #cbd9bd;border-radius:10px;font-size:14px;overflow-wrap:anywhere}
.token-number-option:hover:not(:disabled){background:#e0edce;border-color:#7a9a5b}
.token-number-option.is-selected:not(:disabled){background:#214b36;color:#fff;border-color:#214b36;box-shadow:0 0 0 2px #214b3633}
.token-number-option:disabled{background:#e0e4db;color:#78816f;border-color:#d9dfd1;text-decoration:line-through;cursor:not-allowed;opacity:.75}
.token-picker-legend{display:flex;flex-wrap:wrap;gap:16px;margin:14px 0 10px;font-size:11px;color:#607651}
.token-picker>small{font-size:11px;line-height:1.6;display:block}
.token-top{gap:10px}.token-number{min-width:0;overflow-wrap:anywhere}.token .status{flex-shrink:0}
@media(max-width:700px){.token-picker{padding:14px}.token-picker-heading{flex-direction:column;gap:10px}.token-picker-controls{align-items:stretch;flex-direction:column;gap:10px}.token-picker-controls label{max-width:none}.token-page-controls{justify-content:space-between}.token-number-grid{grid-template-columns:repeat(auto-fill,minmax(42px,1fr));gap:6px}.token-number-option{min-height:44px}.token-picker-legend{gap:12px}.booking-pool-fields{grid-template-columns:1fr}}
