/* Employee-only design. Never paint the full-screen navigation viewport. */
body[data-role="staff"]{--staff-bg:#fcfaff;--staff-surface:#fff;--staff-ink:#201a29;--staff-muted:#797281;--staff-line:#e8e3ed;--staff-purple:#7428f5;--staff-soft:#f1e9ff;--bg:var(--staff-bg);--surface:var(--staff-surface);--text:var(--staff-ink);--muted:var(--staff-muted);--line:var(--staff-line);--accent:var(--staff-purple);--tint:var(--staff-soft);--staff-dock-space:96px;background:var(--staff-bg);color:var(--text);font-size:16px;--client-header-height:calc(64px + var(--ios-safe-top,env(safe-area-inset-top,0px)))}
html[data-theme="dark"] body[data-role="staff"]{--staff-bg:#141119;--staff-surface:#1f1a26;--staff-ink:#f5f1fa;--staff-muted:#b5adbf;--staff-line:#373040;--staff-purple:#b88aff;--staff-soft:#38274d;color-scheme:dark}
body[data-role="staff"] .consumer>.content{padding:20px max(18px,calc((100vw - 640px)/2)) calc(var(--staff-dock-space) + env(safe-area-inset-bottom,0px))!important;background:var(--staff-bg);scrollbar-width:thin}
body[data-role="staff"] #page-content{max-width:640px!important;margin:0 auto!important}
body[data-role="staff"] .consumer>.work-topbar{padding-inline:max(18px,calc((100vw - 720px)/2));background:var(--staff-bg)!important;border-bottom:0}
body[data-role="staff"] .work-brand{max-width:calc(100% - 164px);gap:9px;flex:1;min-width:0}
body[data-role="staff"] .work-brand>img{width:36px;height:36px;border-radius:10px}
body[data-role="staff"] .staff-business{display:flex;align-items:center;gap:4px;min-width:0;position:relative}
body[data-role="staff"] .staff-business>strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.3;font-weight:750;color:var(--text)}
body[data-role="staff"] .staff-workspace-select{position:static;display:flex;align-items:center;min-width:14px}
body[data-role="staff"] .staff-workspace-select .context-picker{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;margin:0}
body[data-role="staff"] .staff-business:focus-within{outline:2px solid var(--accent);outline-offset:5px;border-radius:5px}
body[data-role="staff"] .client-fixed-actions.topbar{right:max(18px,calc((100vw - 720px)/2))}
body[data-role="staff"] .employee-page{min-width:0;animation:employee-enter 180ms cubic-bezier(.2,.7,.3,1)}
body[data-role="staff"] :is(h1,h2,h3,p){overflow-wrap:anywhere}
body[data-role="staff"] .employee-page h1{font-size:clamp(24px,6vw,28px);line-height:1.18;letter-spacing:-.8px;margin:0;font-weight:800}
body[data-role="staff"] .employee-page h2{font-size:20px;line-height:1.25;letter-spacing:-.45px;margin:0;font-weight:750}
body[data-role="staff"] .employee-page h3{font-size:18px;margin:0}
body[data-role="staff"] .employee-page button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
body[data-role="staff"] .btn{min-height:44px;border-radius:12px;font-size:16px;font-weight:650;box-shadow:none;transition:opacity 150ms,transform 150ms}
body[data-role="staff"] .btn:not(.secondary):not(.danger){background:linear-gradient(115deg,#7e32fa,#6522e9);border:1px solid #7428f5;color:white;box-shadow:0 5px 16px #7428f51a}
body[data-role="staff"] .btn.secondary{border:1px solid color-mix(in srgb,var(--accent) 55%,var(--line));color:var(--accent);background:transparent}
body[data-role="staff"] .btn[disabled]{opacity:.46;cursor:not-allowed;box-shadow:none}
body[data-role="staff"] .btn:active:not([disabled]){transform:scale(.98)}
body[data-role="staff"] :is(input,select,textarea){font-size:16px;min-width:0;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:10px}
body[data-role="staff"] :is(button,input,select,summary):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
body[data-role="staff"] [hidden]{display:none!important}
body[data-role="staff"] .staff-greeting{margin:0 0 20px}
body[data-role="staff"] .staff-date{color:var(--muted);font-size:12px;letter-spacing:.45px;text-transform:uppercase;margin:0 0 7px;font-weight:550}
body[data-role="staff"] .staff-work-card.staff-shift-card{padding:18px;border:0;border-radius:18px;background:linear-gradient(115deg,var(--staff-soft),color-mix(in srgb,var(--staff-soft) 60%,var(--surface)));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 7%,transparent);margin:0 0 20px}
body[data-role="staff"] .staff-shift-caption{text-transform:uppercase;letter-spacing:.4px;font-size:12px;font-weight:750;margin:0 0 7px;color:var(--text)}
body[data-role="staff"] .staff-shift-card h2{font-size:22px}
body[data-role="staff"] .staff-shift-time{font-size:20px;font-weight:750;margin:7px 0 3px;line-height:1.3}
body[data-role="staff"] .staff-shift-time span{font-size:13px;color:var(--muted);font-weight:500;display:block;margin-top:3px}
body[data-role="staff"] .staff-shift-address{margin:6px 0 14px;color:var(--muted);font-size:14px;line-height:1.5}
body[data-role="staff"] .staff-shift-card .btn{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 15px}
body[data-role="staff"] .staff-shift-hint{font-size:13px;line-height:1.5;margin:10px 0 0;color:var(--muted)}
body[data-role="staff"] .staff-geo-message{font-size:14px;margin-top:12px;padding:12px;border-radius:10px;color:var(--text);background:var(--surface);line-height:1.5}
body[data-role="staff"] .staff-geo-message p{font-size:13px;margin:8px 0 0;color:var(--muted)}
body[data-role="staff"] .staff-statistics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 26px}
body[data-role="staff"] .staff-statistics>div{min-width:0;padding:0 8px;text-align:center;border-right:1px solid var(--line)}
body[data-role="staff"] .staff-statistics>div:first-child{padding-left:8px}body[data-role="staff"] .staff-statistics>div:last-child{border:0;padding-right:8px}
body[data-role="staff"] .staff-statistics strong{display:block;font-size:30px;line-height:1.1;font-weight:800;font-variant-numeric:tabular-nums}
body[data-role="staff"] .staff-statistics span{display:block;font-size:14px;font-weight:700;margin:5px 0 3px}
body[data-role="staff"] .staff-statistics small{display:block;color:var(--muted);font-size:11px;line-height:1.4}
body[data-role="staff"] .staff-section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}
body[data-role="staff"] .staff-section-heading>span{font-size:13px;color:var(--muted);flex-shrink:0}
body[data-role="staff"] .staff-section-heading h2{font-size:18px}
body[data-role="staff"] .staff-activity{margin-bottom:26px}
body[data-role="staff"] .staff-activity :is(.overview-chart,.chart-wrap,.chart){background:transparent;border:0;box-shadow:none;padding:0}
body[data-role="staff"] .staff-activity svg{width:100%;height:auto;max-height:190px;display:block}
body[data-role="staff"] .staff-activity-list article{display:flex;flex-direction:column;gap:5px;padding:14px 0;border-bottom:1px solid var(--line);font-size:15px}
body[data-role="staff"] .staff-activity-list time{color:var(--muted);font-size:13px}
body[data-role="staff"] .staff-empty-activity{font-size:15px;margin:0}
/* Staff uses the same glass dock material and sliding marker as other roles. */
body[data-role="staff"] .consumer-nav-viewport{background:transparent!important;pointer-events:none!important}
body[data-role="staff"] .consumer-nav-viewport>.consumer-nav-frame{pointer-events:auto!important}
/* Scanner is a viewport-sized grid. No scroll is required for its controls. */
body[data-role="staff"].staff-scanner-view .consumer>.content{overflow:hidden!important;padding:12px max(18px,calc((100vw - 520px)/2)) calc(var(--staff-dock-space) + env(safe-area-inset-bottom,0px))!important}
body[data-role="staff"].staff-scanner-view #page-content{height:100%;max-width:520px!important}
body[data-role="staff"] .compact-staff-scanner{display:grid;grid-template-rows:auto auto minmax(64px,1fr) 0px 44px auto;gap:9px;height:100%;max-height:100%;width:100%;max-width:none;margin:0;position:relative;min-height:0}
body[data-role="staff"] .staff-scanner-heading h1{margin:0;font-size:28px}
body[data-role="staff"] .staff-scanner-heading p{font-size:14px;color:var(--muted);margin:4px 0 0;line-height:1.4}
body[data-role="staff"] .staff-scanner-state{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);min-width:0;line-height:1.4;overflow:hidden}
body[data-role="staff"] .staff-scanner-state span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
body[data-role="staff"] .staff-scanner-state i{display:block;width:6px;height:6px;flex-shrink:0;border-radius:50%;background:var(--muted)}
body[data-role="staff"] .staff-scanner-state[data-state="open"] i{background:#30a36a}
body[data-role="staff"] .staff-inline-camera{min-height:0;position:relative;overflow:hidden;border-radius:18px;background:linear-gradient(145deg,var(--staff-soft),var(--surface));border:1px solid var(--line);isolation:isolate}
body[data-role="staff"] .staff-inline-camera video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
body[data-role="staff"] .staff-camera-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;text-align:center;color:var(--muted)}
body[data-role="staff"] .staff-camera-placeholder>.ui-icon{width:54px;height:54px;color:var(--accent);opacity:.5}
body[data-role="staff"] .staff-camera-placeholder span{font-size:13px;line-height:1.5;max-width:220px}
body[data-role="staff"] .staff-camera-reticle{position:absolute;inset:22% 20%;pointer-events:none}
body[data-role="staff"] .staff-camera-reticle i{position:absolute;width:20px;height:20px;border:2px solid #b584ff;filter:drop-shadow(0 0 3px #fff9)}
body[data-role="staff"] .staff-camera-reticle i:nth-child(1){top:0;left:0;border-right:0;border-bottom:0;border-top-left-radius:7px}
body[data-role="staff"] .staff-camera-reticle i:nth-child(2){top:0;right:0;border-left:0;border-bottom:0;border-top-right-radius:7px}
body[data-role="staff"] .staff-camera-reticle i:nth-child(3){bottom:0;right:0;border-left:0;border-top:0;border-bottom-right-radius:7px}
body[data-role="staff"] .staff-camera-reticle i:nth-child(4){bottom:0;left:0;border-right:0;border-top:0;border-bottom-left-radius:7px}
body[data-role="staff"] .staff-torch{position:absolute;right:12px;top:12px;width:44px;height:44px;display:grid;place-items:center;border-radius:50%;background:#15101f99;color:#fff;border:1px solid #ffffff60}
body[data-role="staff"] .staff-torch[aria-pressed="true"]{background:#fff;color:#6020d1}
body[data-role="staff"] .staff-camera-status{font-size:12px;line-height:18px;text-align:center;color:var(--muted);height:0;margin:0;position:relative;top:-30px;z-index:2;pointer-events:none;padding-inline:14px;overflow:visible}
body[data-role="staff"] .compact-staff-scanner:has([data-camera="active"]) .staff-camera-status{color:white;text-shadow:0 1px 5px #000}
body[data-role="staff"] .staff-camera-actions .btn{display:flex;align-items:center;justify-content:center;gap:8px;height:44px;min-height:44px;padding:8px 12px}
body[data-role="staff"] .staff-manual-code{display:grid;grid-template-rows:auto 42px 44px;gap:8px;margin:0;min-width:0}
body[data-role="staff"] .staff-manual-code label{display:flex;justify-content:space-between;gap:10px;font-size:13px;line-height:1.3;color:var(--muted)}
body[data-role="staff"] .staff-manual-code label span:first-child{color:var(--text);font-weight:650}
body[data-role="staff"] .staff-manual-code #client-token{box-sizing:border-box;width:100%;height:42px;min-height:0;padding:5px 2px;border:0;border-radius:0;background:repeating-linear-gradient(to right,transparent 0,transparent calc(16.666% - 26px),var(--line) calc(16.666% - 26px),var(--line) calc(16.666% - 2px),transparent calc(16.666% - 2px),transparent 16.666%) left bottom/100% 2px no-repeat;font-size:23px;font-weight:650;letter-spacing:clamp(22px,7.8vw,38px);text-indent:clamp(22px,7.8vw,38px);text-align:center;color:var(--text);font-variant-numeric:tabular-nums;line-height:1.2}
body[data-role="staff"] .staff-manual-code input::placeholder{color:color-mix(in srgb,var(--muted) 65%,transparent)}
body[data-role="staff"] .staff-manual-code .btn{display:flex;justify-content:space-between;align-items:center;padding:9px 14px}
body[data-role="staff"] .compact-staff-scanner .staff-scan-status{position:absolute;left:0;right:0;bottom:0;z-index:4;background:var(--surface);box-shadow:0 8px 26px #17092720;border-radius:12px;font-size:14px;margin:0}
body[data-role="staff"] .staff-scanner-heading~.staff-scan-status:empty{display:none}
body[data-role="staff"] .staff-inline-camera[data-camera="loading"] .staff-camera-placeholder>.ui-icon{animation:employee-camera-breathe 1.1s ease-in-out infinite}
/* Pages and rows */
body[data-role="staff"] .employee-page-head{display:flex;align-items:flex-start;gap:12px;margin:0 0 24px;min-height:44px}
body[data-role="staff"] .employee-page-head>div{min-width:0}
body[data-role="staff"] .employee-page-head p,body[data-role="staff"] .staff-section-heading>div>p{margin:6px 0 0;font-size:14px;line-height:1.45;color:var(--muted)}
body[data-role="staff"] :is(.staff-back,.staff-icon-button){display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;min-height:44px;border:0;border-radius:12px;background:transparent;color:var(--text);margin-top:-7px}
body[data-role="staff"] .staff-icon-button{margin:0}
body[data-role="staff"] .staff-text-action{display:flex;align-items:center;gap:5px;min-height:44px;background:transparent;border:0;color:var(--accent);font-size:14px!important;font-weight:650;flex-shrink:0;padding:8px 0}
body[data-role="staff"] .staff-calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0}
body[data-role="staff"] .staff-calendar-heading strong{text-transform:capitalize;font-size:16px}
body[data-role="staff"] .staff-date-filter{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;gap:8px;align-items:center;margin:10px 0 18px}
body[data-role="staff"] .staff-date-control{height:44px;padding:0 9px;display:flex;align-items:center;justify-content:flex-start;gap:6px;position:relative;font-size:13px;font-weight:550;min-width:0;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
body[data-role="staff"] .staff-date-control input[type="date"]{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:pointer}
body[data-role="staff"] .staff-date-filter>.btn{width:44px;height:44px;padding:0;display:grid;place-items:center;min-height:44px}
body[data-role="staff"] .staff-week-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin-bottom:24px}
body[data-role="staff"] .staff-week-strip button{border:0;background:transparent;color:var(--text);min-width:0;min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:4px 0;position:relative;border-radius:16px}
body[data-role="staff"] .staff-week-strip strong{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-size:16px}
body[data-role="staff"] .staff-week-strip button.is-selected strong{background:var(--accent);color:var(--surface)}
body[data-role="staff"] .staff-week-strip span{font-size:12px;color:var(--muted)}
body[data-role="staff"] .staff-week-strip i{position:absolute;bottom:0;width:3px;height:3px;border-radius:50%;background:var(--accent)}
body[data-role="staff"] .staff-list-caption{font-size:16px!important;margin:0 0 14px!important}
body[data-role="staff"] .staff-shift-row{position:relative;border-left:3px solid var(--accent);padding:4px 0 18px 16px;margin:0 0 20px;border-bottom:1px solid var(--line)}
body[data-role="staff"] .staff-shift-row.is-cancelled{border-left-color:var(--muted)}
body[data-role="staff"] .staff-shift-row-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;font-size:13px;color:var(--muted);margin-bottom:8px}
body[data-role="staff"] .staff-shift-row-top span{position:relative;padding-left:11px}
body[data-role="staff"] .staff-shift-row-top span::before{position:absolute;content:'';left:0;top:5px;width:5px;height:5px;border-radius:50%;background:var(--accent)}
body[data-role="staff"] .staff-shift-row h3{font-size:25px;letter-spacing:-.5px;line-height:1.2}
body[data-role="staff"] .staff-shift-row p{display:flex;align-items:center;gap:5px;margin:7px 0 0;font-size:14px;line-height:1.5;color:var(--muted)}
body[data-role="staff"] .staff-shift-row p.staff-shift-note{display:block;color:var(--text);white-space:pre-wrap}
body[data-role="staff"] .staff-select-label{display:flex;flex-direction:column;gap:7px;font-size:13px;color:var(--muted);margin:0 0 22px}
body[data-role="staff"] .staff-select-label :is(input,select){display:block;box-sizing:border-box;width:100%;height:44px;padding:10px 12px;font-size:16px;color:var(--text);border-radius:10px;border:1px solid var(--line);background:var(--surface)}
body[data-role="staff"] .staff-fine-total{display:flex;flex-direction:column;gap:7px;margin-bottom:22px}
body[data-role="staff"] .staff-fine-total>span{font-size:14px;color:var(--muted)}
body[data-role="staff"] .staff-fine-total>strong{font-size:42px;font-weight:800;letter-spacing:-1px;line-height:1.15;color:var(--text)}
body[data-role="staff"] .staff-fine-total>small{font-size:13px;color:var(--muted)}
body[data-role="staff"] .staff-list-link{display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box;width:100%;min-height:56px;padding:15px 0;color:var(--text);background:transparent;border:0;border-bottom:1px solid var(--line);text-align:left;font-size:16px;font-weight:650}
body[data-role="staff"] .staff-list-link>span{display:flex;align-items:center;gap:10px}
body[data-role="staff"] .staff-fine-list{margin-top:10px}
body[data-role="staff"] .staff-fine-row{width:100%;border:0;border-bottom:1px solid var(--line);padding:17px 0;background:transparent;color:var(--text);text-align:left;display:flex;align-items:center;gap:10px}
body[data-role="staff"] .staff-fine-row>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
body[data-role="staff"] .staff-fine-row time,body[data-role="staff"] .staff-fine-row small{font-size:12px;line-height:1.4;color:var(--muted)}
body[data-role="staff"] .staff-fine-row strong{font-size:16px;line-height:1.4;font-weight:650}
body[data-role="staff"] .staff-fine-row>b{font-size:16px;color:#c94168;white-space:nowrap}
body[data-role="staff"] .staff-fine-row.is-cancelled>b{color:var(--muted);text-decoration:line-through}
body[data-role="staff"] .staff-page-empty{padding:42px 6px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:14px;color:var(--muted)}
body[data-role="staff"] .staff-page-empty>.ui-icon{color:var(--text);width:42px;height:42px;stroke-width:1.4}
body[data-role="staff"] .staff-page-empty h2{color:var(--text);font-size:22px}
body[data-role="staff"] .staff-page-empty p{margin:0;line-height:1.5;font-size:15px}
body[data-role="staff"] .staff-rule-status{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--muted);margin:-7px 0 18px;line-height:1.5}
body[data-role="staff"] .staff-rule-status.enabled{color:#24996b}
body[data-role="staff"] .staff-section-caption{color:var(--muted);font-size:14px;margin:0 0 18px}
body[data-role="staff"] details.staff-rule{border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;padding:0;box-shadow:none}
body[data-role="staff"] .staff-rule>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;list-style:none;min-height:58px;padding:14px 0;cursor:pointer;font-size:15px;line-height:1.4}
body[data-role="staff"] .staff-rule>summary::-webkit-details-marker{display:none}
body[data-role="staff"] .staff-rule>summary>span{flex:1;min-width:0}
body[data-role="staff"] .staff-rule>summary>strong{font-size:15px;white-space:nowrap}
body[data-role="staff"] .staff-rule>summary>.ui-icon{width:14px;flex-shrink:0;color:var(--muted);transition:transform 160ms}
body[data-role="staff"] .staff-rule[open]>summary>.ui-icon{transform:rotate(90deg)}
body[data-role="staff"] .staff-rule>p{margin:0 0 16px;color:var(--muted);font-size:14px;line-height:1.65;animation:employee-enter 160ms ease-out}
body[data-role="staff"] .staff-fine-detail .fine-detail{padding:0;color:var(--text);background:transparent}
body[data-role="staff"] .staff-fine-detail .fine-detail h3{font-size:22px;line-height:1.4;margin:14px 0}
body[data-role="staff"] .staff-fine-detail .fine-detail-amount{display:block;font-size:36px;color:var(--text);margin-bottom:22px}
body[data-role="staff"] .staff-fine-detail .fine-detail dl>div{grid-template-columns:minmax(90px,.75fr) minmax(0,1.25fr);border-color:var(--line);font-size:15px;gap:14px;padding:13px 0}
body[data-role="staff"] .staff-fine-detail .fine-back{background:var(--surface);border:1px solid var(--line);color:var(--accent);border-radius:12px;padding:12px 14px;min-height:44px;font-size:15px}
/* Profile keeps the existing editor, support, notifications and account actions. */
body[data-role="staff"] .staff-profile-identity{display:flex;align-items:center;gap:15px;margin:22px 0 26px}
body[data-role="staff"] .staff-profile-identity .avatar.big{width:70px;height:70px;min-width:70px;border-radius:50%;font-size:26px;background:var(--staff-soft);color:var(--accent);overflow:hidden}
body[data-role="staff"] .staff-profile-identity .avatar img{width:100%;height:100%;object-fit:cover}
body[data-role="staff"] .staff-profile-identity h2{font-size:22px}
body[data-role="staff"] .staff-profile-identity p{margin:5px 0 0;color:var(--muted);font-size:15px}
body[data-role="staff"] .staff-profile-login{display:flex;flex-direction:column;gap:5px;margin-bottom:22px}
body[data-role="staff"] .staff-profile-login strong{font-size:17px;overflow-wrap:anywhere}
body[data-role="staff"] .staff-profile-login span{font-size:13px;color:var(--muted)}
body[data-role="staff"] .staff-profile-links{margin-top:26px}
body[data-role="staff"] .staff-logout{color:var(--text)}
body[data-role="staff"] .staff-push-reminder{display:flex;align-items:center;gap:8px;width:100%;min-height:40px;color:var(--accent);background:transparent;border:0;padding:8px 0;margin:0 0 12px;font-size:13px;text-align:left}
body[data-role="staff"] .staff-push-reminder>span{flex:1}
body[data-role="staff"] .staff-push-message{font-size:16px;line-height:1.6}
body[data-role="staff"] .staff-push-symbol{display:grid;place-items:center;width:54px;height:54px;border-radius:16px;background:var(--staff-soft);color:var(--accent);margin-bottom:16px}
body[data-role="staff"] .staff-push-message .btn{display:block;width:100%;text-align:center}
@media(min-width:760px){body[data-role="staff"] .staff-greeting h1{font-size:30px}body[data-role="staff"] .staff-work-card.staff-shift-card{padding:24px}body[data-role="staff"] .staff-analytics .staff-statistics strong{font-size:36px}}
@media(max-width:360px){body[data-role="staff"] .work-brand{max-width:calc(100% - 154px);gap:6px}body[data-role="staff"] .work-brand>img{width:30px;height:30px}body[data-role="staff"] .staff-business>strong{font-size:12px}body[data-role="staff"] .staff-date-control{padding-inline:7px;font-size:12px;gap:4px}body[data-role="staff"] .staff-date-control>.ui-icon{width:13px;height:13px}body[data-role="staff"] .staff-statistics small{font-size:10px}body[data-role="staff"] .staff-statistics>div{padding-inline:7px}body[data-role="staff"] .staff-rule>summary{font-size:14px}}
@media(max-height:700px){body[data-role="staff"]{--staff-dock-space:88px}body[data-role="staff"] .compact-staff-scanner{gap:6px;grid-template-rows:auto auto minmax(64px,1fr) 0px 44px auto}body[data-role="staff"] .staff-scanner-heading h1{font-size:24px}body[data-role="staff"] .staff-scanner-heading p{font-size:13px;margin-top:2px}body[data-role="staff"].staff-scanner-view .consumer>.content{padding-top:9px!important}body[data-role="staff"] .staff-camera-placeholder{gap:5px;padding:12px}body[data-role="staff"] .staff-camera-placeholder>.ui-icon{width:34px;height:34px}body[data-role="staff"] .staff-camera-placeholder span{font-size:12px;max-width:210px}body[data-role="staff"] .staff-camera-status{font-size:11px;top:-25px}body[data-role="staff"] .staff-manual-code{gap:6px;grid-template-rows:auto 36px 44px}body[data-role="staff"] .staff-manual-code #client-token{height:36px;font-size:22px}body[data-role="staff"] .staff-scanner-state{font-size:12px}body[data-role="staff"] .consumer-nav button{min-height:48px!important}}
@media(prefers-reduced-motion:reduce){body[data-role="staff"] .employee-page,body[data-role="staff"] .staff-rule>p,body[data-role="staff"] .staff-inline-camera[data-camera="loading"] .staff-camera-placeholder>.ui-icon{animation:none!important}body[data-role="staff"] :is(.btn,.staff-rule>summary>.ui-icon){transition:none!important}}
@media(prefers-reduced-transparency:reduce){body[data-role="staff"] .consumer-nav-viewport>.consumer-nav-frame{background:var(--surface)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:0 5px 18px #160b2720!important}}
@keyframes employee-enter{from{opacity:.35;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@keyframes employee-camera-breathe{0%,100%{opacity:.35}50%{opacity:.75}}
/* Keep a visible gap between the last scanner action and the floating dock. */
body[data-role="staff"]{--staff-dock-space:104px}
@media(max-height:700px){body[data-role="staff"]{--staff-dock-space:96px}}
body[data-role="staff"] .staff-activity .overview-plot{height:152px;min-height:0}
body[data-role="staff"] .staff-activity .overview-chart-main{min-width:0}
body[data-role="staff"] .staff-activity .overview-chart-main svg{height:130px;max-height:130px}
/* Entrance motion never reduces readability or hides a whole employee page. */
@keyframes employee-enter{from{opacity:1;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
body[data-role="staff"] .staff-activity .overview-chart-main{height:152px}
body[data-role="staff"] .staff-activity .overview-y-axis{height:130px;font-size:11px}
body[data-role="staff"] .staff-activity .overview-x-axis{font-size:12px}
/* When typing a code, preserve the field and action above the software keyboard. */
body[data-role="staff"].keyboard-open #app>.consumer[data-stable-work]{height:var(--visible-height,100dvh)!important}
body[data-role="staff"].keyboard-open.staff-scanner-view .consumer>.content{padding-bottom:12px!important}
body[data-role="staff"].keyboard-open .compact-staff-scanner{display:flex;flex-direction:column;gap:8px}
body[data-role="staff"].keyboard-open .staff-inline-camera,body[data-role="staff"].keyboard-open .staff-camera-actions,body[data-role="staff"].keyboard-open .staff-camera-status,body[data-role="staff"].keyboard-open .staff-scanner-heading p{display:none!important}
body[data-role="staff"].keyboard-open .staff-scanner-heading h1{font-size:21px}
body[data-role="staff"].keyboard-open .staff-manual-code{margin-top:auto}
body[data-role="staff"] .staff-business{min-height:44px}
/* Date ranges are small overlays: the page underneath never changes geometry. */
.staff-range-trigger{display:inline-flex;align-items:center;justify-content:flex-end;gap:6px;min-height:40px;max-width:190px;padding:6px 0;border:0;background:transparent;color:var(--muted);font:inherit;font-size:13px;cursor:pointer;white-space:nowrap}
.staff-range-trigger>span{overflow:hidden;text-overflow:ellipsis}.staff-range-trigger>.ui-icon{flex-shrink:0}.staff-range-trigger>.ui-icon:last-child{rotate:90deg}
.staff-range-trigger[aria-expanded=true]{color:var(--accent)}
.staff-range-popover{position:fixed;inset:auto;margin:0;box-sizing:border-box;z-index:1000;width:min(340px,calc(100vw - 28px));padding:17px;border-radius:20px;border:1px solid var(--line);background:var(--surface,#fff);color:var(--text,#201a29);box-shadow:0 18px 60px #180a3033;font:15px Inter,system-ui;animation:range-appear 140ms ease-out}
.staff-range-popover::backdrop{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
.staff-range-popover header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.staff-range-popover header strong{font-size:16px}
.staff-range-close{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border:0;border-radius:50%;background:var(--tint,#f3ecff);color:var(--text);cursor:pointer}
.staff-range-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.staff-range-fields label{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:13px;color:var(--muted)}
.staff-range-fields input[type=date]{display:block;box-sizing:border-box;width:100%;min-width:0;height:44px;margin:0;padding:9px 7px;font-size:16px;border-radius:10px;border:1px solid var(--line);color:var(--text);background:var(--bg,#fcfaff)}
.staff-range-presets{display:flex;gap:7px;flex-wrap:wrap;margin:15px 0}.staff-range-presets button{min-height:34px;padding:7px 10px;font:inherit;font-size:12px;border:1px solid var(--line);background:var(--tint,#f3ecff);color:var(--text);border-radius:9px;cursor:pointer}
.staff-range-popover footer{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:13px}.staff-range-popover footer>button:first-child{border:0;background:transparent;color:var(--muted);padding:10px 0;font:inherit;font-size:14px;cursor:pointer}.staff-range-popover footer .btn{min-height:42px;padding:10px 18px;font-size:15px}
.staff-range-popover [data-range-error]{font-size:13px;line-height:1.45;color:#c74668;margin:10px 0 0}
body[data-role=staff] .staff-fines-range{display:flex;justify-content:flex-end;margin:-13px 0 15px}
body[data-role=staff] .staff-fine-row.is-paid>b{color:#26966b}
body[data-role=staff] .staff-fine-row.is-paid small{color:var(--muted)}
.fine-state.paid{color:#239f73;border-color:#239f7350;background:#239f7312}.fine-admin-actions{display:flex;align-items:center;gap:14px;padding:6px 0 12px;flex-wrap:wrap}
/* A shorter live view raises the manual code; it does not create a second scroll area. */
body[data-role=staff] .compact-staff-scanner{height:min(100%,560px);grid-template-rows:auto auto minmax(64px,1fr) 0px 44px auto}
body[data-role=staff] .staff-inline-camera{align-self:stretch}
@media(max-height:700px){body[data-role=staff] .compact-staff-scanner{height:100%}}
@media(prefers-reduced-motion:reduce){.staff-range-popover{animation:none}}
@keyframes range-appear{from{opacity:.7;translate:0 -3px}to{opacity:1;translate:0 0}}

.staff-range-trigger>.ui-icon{width:16px!important;height:16px!important;flex:0 0 16px!important}.staff-range-trigger>span{flex:0 1 auto;min-width:0}.staff-range-close>.ui-icon{width:18px;height:18px}

/* Persistent compact analytics range: native date picker over a short date label. */
body[data-role=staff] .staff-inline-range{margin:16px 0 22px;min-width:0;padding:0;border:0;background:transparent}
body[data-role=staff] .staff-inline-range-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;gap:8px;align-items:stretch}
body[data-role=staff] .staff-inline-date{position:relative;display:flex;align-items:center;gap:8px;min-width:0;min-height:44px;margin:0;padding:10px 12px;border:1px solid var(--staff-line);border-radius:12px;background:var(--staff-surface);box-sizing:border-box;overflow:hidden}
body[data-role=staff] .staff-inline-date>span{font-size:12px;color:var(--muted);flex:0 0 auto}
body[data-role=staff] .staff-inline-date>strong{font-size:14px;font-weight:550;line-height:20px;white-space:nowrap;color:var(--text);font-variant-numeric:tabular-nums}
body[data-role=staff] .staff-inline-date>input[type=date]{position:absolute;inset:0;width:100%;height:100%;min-width:0;max-width:100%;margin:0;padding:0;border:0;opacity:.001;font-size:16px;cursor:pointer;box-sizing:border-box}
body[data-role=staff] .staff-inline-date:focus-within{outline:2px solid var(--accent);outline-offset:2px}
body[data-role=staff] .staff-inline-apply{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:12px;background:var(--staff-soft);color:var(--accent);cursor:pointer;transition:background 150ms,transform 150ms}
body[data-role=staff] .staff-inline-apply>.ui-icon{width:18px!important;height:18px!important;flex:none}
body[data-role=staff] .staff-inline-apply:active{transform:scale(.95)}
body[data-role=staff] .staff-inline-presets{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;margin-top:8px}
body[data-role=staff] .staff-inline-presets>button{display:block;flex:0 1 auto;min-height:32px;padding:6px 10px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:12px;line-height:18px;cursor:pointer}
body[data-role=staff] .staff-inline-presets>button:hover,body[data-role=staff] .staff-inline-presets>button:focus-visible{background:var(--staff-soft);color:var(--accent)}
body[data-role=staff] .staff-inline-range [data-range-error]{font-size:12px;color:#c74665;line-height:1.4;margin:8px 0 0}
@media(max-width:350px){body[data-role=staff] .staff-inline-date{padding:10px 8px;gap:5px}body[data-role=staff] .staff-inline-date>strong{font-size:13px}}
@media(prefers-reduced-motion:reduce){body[data-role=staff] .staff-inline-apply{transition:none}}

@media(max-width:360px){body[data-role=staff] .staff-statistics>div:first-child,body[data-role=staff] .staff-statistics>div:last-child{padding-inline:7px}body[data-role=staff] .staff-statistics span{font-size:12px}}

/* Keep manual lookup close to the dock without enlarging the camera preview. */
body[data-role=staff] .compact-staff-scanner{height:100%;grid-template-rows:auto auto minmax(64px,clamp(120px,28dvh,260px)) 0px 44px minmax(12px,1fr) auto}
body[data-role=staff] .staff-manual-code{grid-template-rows:auto 48px 44px;gap:14px}
body[data-role=staff] .staff-code-input{position:relative;min-width:0;height:100%;margin:0}
body[data-role=staff] .staff-code-digits{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;height:100%;pointer-events:none}
body[data-role=staff] .staff-code-digits>span{display:flex;justify-content:center;align-items:center;min-width:0;border-bottom:2px solid var(--line);font:650 24px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--text);font-variant-numeric:tabular-nums}
body[data-role=staff] .staff-code-digits>span.is-empty{color:var(--muted);opacity:.45}
body[data-role=staff] .staff-code-input:focus-within .staff-code-digits>span{border-bottom-color:var(--accent)}
body[data-role=staff] .staff-manual-code .staff-code-input #client-token{position:absolute;inset:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;background:transparent;opacity:.01;color:transparent;caret-color:transparent;text-indent:0;letter-spacing:normal;font-size:16px;line-height:normal}
@media(max-height:700px){body[data-role=staff] .compact-staff-scanner{gap:6px;grid-template-rows:auto auto minmax(64px,155px) 0px 44px minmax(8px,1fr) auto}body[data-role=staff] .staff-manual-code{grid-template-rows:auto 36px 44px;gap:10px}}
body[data-role=staff].keyboard-open .staff-scan-spacer{display:none}

body[data-role=staff] .staff-shift-card .staff-shift-headline{font-size:24px;line-height:1.3;margin:0 0 12px;letter-spacing:-.4px}body[data-role=staff] .staff-shift-hours{display:inline-block;white-space:nowrap}body[data-role=staff] .staff-shift-countdown{font-size:13px;line-height:1.5;color:var(--muted);margin:10px 0 16px}body[data-role=staff] .staff-shift-countdown strong{font-weight:650;color:var(--text);white-space:nowrap;font-variant-numeric:tabular-nums}

body[data-role=staff].staff-guest-view :is(.consumer>.topbar,.consumer-nav-viewport,.client-fixed-actions,.work-desktop-sidebar){display:none!important}body[data-role=staff].staff-guest-view .consumer{grid-template-rows:minmax(0,1fr)!important;height:var(--visible-height,100dvh)!important}body[data-role=staff].staff-guest-view .consumer>.content{padding:calc(16px + var(--ios-safe-top,env(safe-area-inset-top,0px))) max(18px,calc((100vw - 560px)/2)) calc(24px + env(safe-area-inset-bottom,0px))!important;overflow-y:auto!important;grid-row:1}body[data-role=staff] .staff-guest-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:22px}body[data-role=staff] .staff-guest-head h1{margin:0;font-size:26px}body[data-role=staff] .staff-guest-head .staff-icon-button{flex:0 0 44px}body[data-role=staff] .staff-guest-page .scan-program{padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--surface);margin:16px 0}body[data-role=staff] .staff-guest-page .scan-program>.row.wrap{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}body[data-role=staff] .staff-guest-page .scan-program .btn{min-width:0;min-height:46px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:14px;padding:10px}

body[data-role=staff].staff-guest-view .consumer>.content{inset:0!important}body[data-role=staff] .staff-guest-head{position:sticky;top:var(--ios-safe-top,env(safe-area-inset-top,0px));z-index:3;background:var(--staff-bg)}body[data-role=staff] .staff-guest-page .scan-program>.row.wrap{align-items:stretch}

.staff-next-shift{margin:12px 0 0;color:var(--staff-muted);font-size:14px;line-height:1.6}.staff-next-shift>span{font-size:12px}

/* Shared chat layout must not inherit the employee dashboard's padding. */
body[data-role="staff"].notice-route .consumer>.content{padding:0!important;scroll-padding-top:0!important}

/* Approved client screen: centered, enlarged status; retain the program card position. */
body[data-role=staff] .staff-guest-page .scan-guest-status{justify-content:center;margin:11px 0 18px}
body[data-role=staff] .staff-guest-page .scan-guest-status>.guest-tier{justify-content:center;max-width:100%;box-sizing:border-box;padding:7px 22px;font-size:22px;font-weight:750;line-height:1.3;text-align:center;overflow-wrap:anywhere}

.scan-guest-identity{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;margin:12px 0 24px}
.scan-guest-identity>.avatar{width:88px!important;height:88px!important;min-width:88px!important;flex:none!important;border-radius:50%!important;font-size:32px!important;overflow:hidden}
.scan-guest-identity>.avatar img{width:100%;height:100%;object-fit:cover}
.scan-guest-identity h2{margin:0;font-size:24px;line-height:1.25;overflow-wrap:anywhere}
.scan-guest-identity .scan-guest-phone{margin:0;color:var(--muted);font-size:13px}
#guest-result .scan-guest-status,#scan-result .scan-guest-status{display:flex;flex-direction:column;align-items:center;gap:10px;margin:20px 0;text-align:center}
#guest-result .scan-guest-status .guest-tier,#scan-result .scan-guest-status .guest-tier{font-size:26px!important;line-height:1.2;white-space:normal;text-align:center;max-width:100%;overflow-wrap:anywhere}
#guest-result .scan-program>.row.wrap,#scan-result .scan-program>.row.wrap{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
#guest-result .scan-program>.row.wrap>.btn,#scan-result .scan-program>.row.wrap>.btn{width:100%;min-height:48px}
.stamp-wait{width:100%;min-width:0;display:grid;gap:6px}
.stamp-wait[hidden]{display:none!important}
.stamp-wait>div{height:5px;border-radius:99px;overflow:hidden;background:var(--tint,#ede6ff)}
.stamp-wait>div>span{display:block;height:100%;background:var(--accent,#7853ed);border-radius:99px;transition:width 100ms linear}
.stamp-wait>small{font-size:12px;color:var(--muted);text-align:center}

#scan-result .scan-program,#guest-result .scan-program{box-sizing:border-box;min-width:0;padding:16px!important;border-radius:14px}
#scan-result [data-action=accrue][data-cooldown="1"],#guest-result [data-action=accrue][data-cooldown="1"]{opacity:1!important;color:var(--accent,#7853ed)!important;background:var(--tint,#eee7ff)!important;box-shadow:none!important}

/* Shared native date controls for all work roles. */
body:is(.admin-crm,.root-business-context,.root-crm,[data-role=staff]){--work-date-bg:#f0eafa;--work-date-text:#39265a;--work-date-border:#dcd0ef}
html[data-theme=dark] body:is(.admin-crm,.root-business-context,.root-crm,[data-role=staff]){--work-date-bg:#30263f;--work-date-text:#f1e8ff;--work-date-border:#59446f}
body:is(.admin-crm,.root-business-context,.root-crm,[data-role=staff]) :is(.crm-native-date,.program-date-control,.fine-date-control,.overview-date-control,.staff-date-control,.staff-inline-date){position:relative!important;display:flex!important;align-items:center!important;gap:8px;box-sizing:border-box!important;min-width:0!important;max-width:100%!important;height:44px!important;min-height:44px!important;padding:8px 12px!important;border:1px solid var(--work-date-border)!important;border-radius:10px!important;background:var(--work-date-bg)!important;color:var(--work-date-text)!important;overflow:hidden;font-size:14px!important;font-variant-numeric:tabular-nums}
body:is(.admin-crm,.root-business-context,.root-crm,[data-role=staff]) :is(.crm-native-date,.program-date-control,.fine-date-control,.overview-date-control,.staff-date-control,.staff-inline-date)>:is(span,strong){color:var(--work-date-text)!important;font-size:14px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body:is(.admin-crm,.root-business-context,.root-crm,[data-role=staff]) .crm-native-date{width:100%;justify-content:space-between}
body:is(.admin-crm,.root-business-context,.root-crm,[data-role=staff]) .crm-native-date::after{content:'';flex:0 0 16px;width:16px;height:16px;background:currentColor;opacity:.7;border:1px solid currentColor;border-radius:3px;background:linear-gradient(currentColor,currentColor) 0 4px/100% 1px no-repeat;box-sizing:border-box;pointer-events:none}
body:is(.admin-crm,.root-business-context,.root-crm,[data-role=staff]) .crm-native-date>input{position:absolute!important;inset:0!important;width:100%!important;max-width:100%!important;min-width:0!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;opacity:0!important;font-size:16px!important;cursor:pointer}
body:is(.admin-crm,.root-business-context,.root-crm,[data-role=staff]) .form-grid.crm-native-date-pair{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;min-width:0}
body:is(.admin-crm,.root-business-context,.root-crm,[data-role=staff]) .crm-native-date-pair>.field{min-width:0;margin:0;grid-column:auto!important;width:100%!important}
