/* The legacy mobile shell locks body scrolling; the employee root owns scrolling. */
#app:has(.ew-shell){display:block;width:100%;min-width:0;height:100vh;height:var(--visible-app-height,100dvh);overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;scroll-padding-block:78px calc(100px + env(safe-area-inset-bottom));background:#f5f4fa}
.ew-shell{--ew-purple:#6050bd;--ew-ink:#29243f;--ew-muted:#79738d;max-width:100%;min-height:100dvh;color:var(--ew-ink);font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:15px;line-height:1.5}.ew-shell *,.ew-dialog *{box-sizing:border-box}.ew-header{height:78px;padding:16px max(20px,calc((100% - 920px)/2));background:#ffffffdf;border-bottom:1px solid #e7e2f0;display:flex;align-items:center;justify-content:space-between;gap:14px;position:sticky;top:0;z-index:10;backdrop-filter:blur(16px)}.ew-brand{display:flex;align-items:center;gap:10px}.ew-brand img{width:38px;height:38px;border-radius:12px}.ew-brand strong{font-size:24px;letter-spacing:-1px}.ew-brand strong span{color:#ce4fa6;margin-left:5px}.ew-header select{background:#f6f3fc;border:1px solid #e1dbef;border-radius:12px;font-size:14px;padding:8px 11px;max-width:130px;color:#504774}.ew-main{max-width:960px;padding:28px 20px 125px;margin:auto;min-width:0}.ew-heading{margin:0 0 22px}.ew-eyebrow{font-size:10px!important;letter-spacing:2.5px;color:#8d83b3!important;margin:0 0 9px!important}.ew-heading h1{font-size:29px;line-height:1.25;margin:0 0 8px;letter-spacing:-.6px;overflow-wrap:anywhere}.ew-heading p{color:var(--ew-muted);font-size:14px;margin:0}.ew-date{display:flex;gap:10px;align-items:end;margin:0 0 18px}.ew-date label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#736988;min-width:0}.ew-date input{width:185px;min-width:0;max-width:100%;padding:10px 12px;border:1px solid #e0daec;background:white;border-radius:12px;font-size:16px;color:#43375e}.ew-hero{border:1px solid #d9d0f2;border-radius:22px;padding:24px;background:linear-gradient(125deg,#ede5ff,#f2efff 55%,#edf4ff);display:flex;justify-content:space-between;gap:22px;align-items:center;margin-bottom:18px}.ew-hero>div>span{font-size:12px;color:#7e6c9e}.ew-hero h2{font-size:26px;line-height:1.4;letter-spacing:-.5px;margin:10px 0}.ew-hero h2 small{display:block;font-size:12px;font-weight:500;letter-spacing:0;color:#71608d}.ew-hero p{font-size:13px;color:#736988;margin:0}.ew-hero-stats{display:flex;gap:24px;flex-shrink:0}.ew-hero-stats>div{display:flex;flex-direction:column;align-items:center;gap:2px}.ew-hero-stats strong{font-size:38px;font-weight:700;line-height:1.2;color:#6652b6}.ew-hero-stats span{font-size:12px;color:#7d7099}.ew-card{background:white;border:1px solid #e5dfed;border-radius:20px;padding:22px;margin-bottom:18px;min-width:0;box-shadow:0 4px 18px #4c356a03}.ew-card h2{font-size:18px;margin:0 0 16px;letter-spacing:-.3px}.ew-card h3{font-size:16px;margin:0}.ew-card p{margin:8px 0;color:#756d86}.ew-card-title{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px}.ew-card-title h2,.ew-card-title h3{margin:0}.ew-card-title>span{font-size:12px;color:#8b7ba4}.ew-btn{display:inline-flex;justify-content:center;align-items:center;gap:8px;background:var(--ew-purple,#6050bd);border:1px solid transparent;border-radius:12px;color:white;font-size:14px;font-weight:650;line-height:1.35;padding:12px 18px;min-height:44px;cursor:pointer;text-decoration:none;white-space:normal;max-width:100%;transition:background .15s;touch-action:manipulation}.ew-btn:hover{background:#5143a2}.ew-btn.secondary{border-color:#e4dcef;background:#faf8ff;color:#645188}.ew-btn.secondary:hover{background:#f0eafa}.ew-btn:disabled{opacity:.5;cursor:wait}.ew-btn svg{width:19px;height:19px;flex-shrink:0}.ew-clock{display:flex;align-items:center;justify-content:space-between;gap:16px;border-color:#d9d1eb}.ew-clock h2{margin-bottom:6px}.ew-clock p{margin:5px 0;display:flex;align-items:center;gap:6px;font-size:14px}.ew-clock small{font-size:11px;color:#9a8eab}.ew-clock-actions{display:flex;gap:8px}.ew-state-dot{width:7px;height:7px;border-radius:50%;background:#45aa91;display:inline-block}.ew-state-dot.off{background:#aaa2b9}.ew-quick{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 18px}.ew-quick .ew-btn{flex:1;min-width:100px;padding:12px}.ew-party{padding:18px 0;display:flex;gap:16px;border-bottom:1px solid #eee9f4}.ew-party:last-child{border:0;padding-bottom:0}.ew-party-time{width:52px;flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:5px;color:#89799f;font-size:12px;padding-top:3px}.ew-party-time strong{font-size:18px;color:#65518a}.ew-party-time:after{content:'';display:block;flex:1;min-height:30px;width:2px;background:#eee7f7;margin:5px 0}.ew-party-body{flex:1;min-width:0}.ew-party p{font-size:13px;margin:5px 0}.ew-party .ew-btn{padding:7px 12px;font-size:12px;min-height:36px;margin-top:7px}.ew-empty{text-align:center;padding:24px 12px;color:#998ba8;font-size:14px;line-height:1.6}.ew-tag{display:inline-flex;align-items:center;padding:4px 8px;background:#f6eddb;border-radius:8px;font-size:11px;color:#9b7e47;flex-shrink:0}.ew-tag.done{background:#e6f4ef;color:#428772}.ew-item{width:100%;display:flex;align-items:center;gap:12px;text-align:left;padding:17px 0;border:0;border-bottom:1px solid #eee8f5;background:transparent;cursor:pointer;color:inherit;font:inherit}.ew-item:last-child{border:0}.ew-item>span:nth-child(2){flex:1;min-width:0}.ew-item strong{display:block;font-size:14px;overflow-wrap:anywhere}.ew-item small{display:block;font-size:11px;color:#9b8ba9;margin-top:4px}.ew-item-icon{display:flex;background:#f2edfc;color:#9375c0;padding:10px;border-radius:12px}.ew-item-icon svg{height:20px;width:20px}.ew-sync{text-align:center;color:#a49bb2;font-size:11px;margin:24px 0 0}.ew-nav{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:center;align-items:stretch;background:#fffffff5;border-top:1px solid #e5deef;z-index:20;padding:7px 12px max(12px,env(safe-area-inset-bottom));backdrop-filter:blur(20px)}.ew-nav>button{width:110px;max-width:20%;min-height:57px;border:0;background:transparent;color:#9b8fae;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:12px;position:relative;cursor:pointer;padding:5px 3px;border-radius:14px}.ew-nav>button svg{width:23px;height:23px;stroke-width:1.8}.ew-nav>button.active{color:#6351b7;background:#f4f0fc;font-weight:700}.ew-nav>button>b{position:absolute;top:0;right:23%;background:#cb5b91;color:white;font-size:10px;min-width:16px;border-radius:10px;padding:0 4px}.ew-warning{border:1px solid #ecd4ac;background:#fff7e9;color:#8f6b36;padding:14px;border-radius:14px;margin-bottom:16px;font-size:13px}.ew-warning .ew-btn{padding:6px 10px;min-height:32px;margin-left:8px}.ew-day-row{display:flex;justify-content:space-between;gap:16px;width:100%;padding:16px 10px;text-align:left;border:0;border-bottom:1px solid #eee8f5;background:transparent;font:inherit;color:inherit;cursor:pointer;border-radius:10px}.ew-day-row.selected{background:#f6f1ff}.ew-day-row small{display:block;color:#998aab;font-size:12px;margin-top:3px}.ew-day-row>div:last-child{text-align:right;font-size:13px;max-width:58%}.ew-day-row>div:last-child small{font-size:11px}.ew-balance{display:flex;align-items:baseline;gap:10px;color:#6751b7;padding:8px 0 18px}.ew-balance strong{font-size:42px;line-height:1}.ew-balance span{font-size:13px}.ew-balance-grid{display:flex;gap:12px;border-top:1px solid #eee8f5;padding-top:16px}.ew-balance-grid>span{flex:1;font-size:11px;color:#9687a7}.ew-balance-grid b{display:block;font-size:20px;color:#5d4c78;padding:4px 0}.ew-muted{font-size:12px!important;color:#9b8baa!important;line-height:1.6}.ew-request-row{border-top:1px solid #eee8f5;padding:18px 0}.ew-request-row:first-of-type{border:0}.ew-request-row .ew-btn{font-size:12px;min-height:34px;padding:7px 12px;margin-top:8px}.ew-request-row p{font-size:13px}.ew-request-row small{color:#9c8ca9;font-size:11px}.ew-reply{background:#f6f1fc;padding:12px;border-radius:12px;color:#7a648b;font-size:13px;margin-top:10px;white-space:pre-wrap}.ew-body-text{white-space:pre-wrap;overflow-wrap:anywhere}.ew-profile{display:flex;gap:16px;align-items:center}.ew-avatar{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:15px;background:#eee7fb;color:#7d63a6;font-weight:600;flex-shrink:0}.ew-profile h2{margin:0}.ew-profile p{margin:4px 0}.ew-profile small{display:block;color:#9b8cab;font-size:12px;overflow-wrap:anywhere}.ew-profile>div{min-width:0}.ew-attendance{display:flex;justify-content:space-between;gap:15px;padding:14px 0;border-bottom:1px solid #eee8f5;font-size:14px}.ew-attendance small{display:block;color:#9b8baa;font-size:12px;margin-top:4px}.ew-attendance b{color:#71608c;font-size:13px;white-space:nowrap}.ew-contact{width:100%;display:flex;align-items:center;gap:12px;border:0;border-bottom:1px solid #eee8f5;background:transparent;text-align:left;font:inherit;color:inherit;padding:15px 0;cursor:pointer}.ew-contact>span:nth-child(2){flex:1;min-width:0}.ew-contact strong{display:block;font-size:14px}.ew-contact small{display:block;font-size:12px;color:#9988a9;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%}.ew-count{font-size:11px;background:#cf6594;color:white;border-radius:12px;padding:2px 6px}.ew-thread{display:flex;flex-direction:column;gap:12px;min-height:150px;max-height:55dvh;overflow:auto;padding-bottom:15px}.ew-bubble{max-width:85%;padding:12px 15px;background:#f3edf9;border-radius:16px 16px 16px 4px;align-self:flex-start;overflow-wrap:anywhere}.ew-bubble.mine{background:#e9e3fa;border-radius:16px 16px 4px 16px;align-self:flex-end}.ew-bubble p{margin:0;color:#55456d;white-space:pre-wrap;font-size:14px}.ew-bubble small{font-size:10px;color:#9c8cae;display:block;margin-top:5px}.ew-message-compose{display:flex;gap:10px;align-items:end;padding-top:14px;border-top:1px solid #eee8f5}.ew-message-compose textarea{min-width:0;flex:1;resize:vertical;padding:12px;border:1px solid #e0d6ee;border-radius:12px;font:inherit;font-size:16px;color:#514062;background:#fbf9ff}.ew-message-compose .ew-btn{flex-shrink:0}.ew-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0)}.ew-dialog{width:min(560px,calc(100vw - 24px))!important;max-width:100%!important;min-width:0!important;max-height:calc(100dvh - 32px);overflow-y:auto;padding:24px!important;border-radius:22px!important;color:#4d3c65;font:15px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.ew-dialog header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.ew-dialog h2{font-size:22px;margin:0}.ew-icon-button{border:0;background:#f5f0fa;color:#9078a7;font-size:26px;width:34px;height:34px;line-height:1;border-radius:10px;cursor:pointer}.ew-dialog form>label,.ew-form-grid>label{display:flex;flex-direction:column;gap:7px;margin:14px 0;font-size:13px;font-weight:600}.ew-dialog input:not([type=checkbox]),.ew-dialog textarea,.ew-dialog select{font:inherit;font-size:16px;padding:12px;border:1px solid #e0d6eb;border-radius:12px;color:#503d66;background:#fcfaff;min-width:0;width:100%;max-width:100%}.ew-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;min-width:0}.ew-dialog form>small{display:block;color:#9a88ab;font-size:12px;line-height:1.6}.ew-dialog .ew-checkbox{flex-direction:row;align-items:center;font-weight:500}.ew-dialog input[type=checkbox]{width:20px;height:20px;accent-color:#6951b4;flex-shrink:0}.ew-dialog .ew-btn{margin-top:10px}.ew-dialog form>.ew-btn{width:100%;margin-top:18px}.ew-info{padding:12px;border-radius:12px;background:#f3eefa;color:#83689b;font-size:13px}.ew-checklist label{display:flex;align-items:start;gap:10px;margin:16px 0;font-size:14px}.ew-step-list>div{display:flex;justify-content:space-between;gap:12px;align-items:center;border-bottom:1px solid #eee7f4;padding:12px 0}.ew-step-list b{font-size:12px;color:#528e7c}.ew-step-list .ew-btn{margin:0;min-height:36px;padding:8px 12px;font-size:13px}.ew-shell :focus-visible,.ew-dialog :focus-visible{outline:3px solid #baa8e2;outline-offset:3px}.modalback:has(.ew-dialog){padding:12px;align-items:center;background:#28203a70;backdrop-filter:blur(4px)}
@media(max-width:600px){.ew-header{height:68px;padding:13px 18px}.ew-brand strong{font-size:23px}.ew-brand img{width:35px;height:35px}.ew-main{padding:24px 17px 120px}.ew-heading h1{font-size:26px}.ew-card{padding:19px 17px;border-radius:18px}.ew-hero{padding:20px;display:block}.ew-hero h2{font-size:24px}.ew-hero-stats{border-top:1px solid #ded4ef;margin-top:18px;padding-top:16px;justify-content:space-between;gap:16px}.ew-hero-stats>div{flex-direction:row;gap:10px}.ew-hero-stats strong{font-size:30px}.ew-hero-stats span{font-size:12px}.ew-clock{align-items:start}.ew-clock-actions{flex-direction:column;min-width:110px}.ew-clock-actions .ew-btn{font-size:14px;padding:12px 14px;min-height:46px}.ew-clock h2{font-size:17px}.ew-clock small{display:block;max-width:170px;font-size:10px}.ew-item .ew-tag{font-size:10px;padding:3px 5px}.ew-item-icon{padding:8px}.ew-item{gap:9px}.ew-quick{gap:8px}.ew-quick .ew-btn{font-size:13px;padding:11px 7px;min-width:88px;gap:5px}.ew-dialog{padding:21px 18px!important}.ew-dialog h2{font-size:20px}.ew-form-grid{gap:10px}.ew-dialog input[type=date]{padding:10px 6px;max-width:100%;width:100%;font-size:15px}.ew-nav{padding-left:12px;padding-right:12px}.ew-nav>button{flex:1;max-width:none}.ew-item strong{font-size:13px}.ew-balance-grid>span{font-size:10px}.ew-card-title .ew-btn{font-size:12px;padding:8px 10px;min-height:36px}.ew-contact strong{font-size:14px}.ew-party-time{width:47px}.ew-party{gap:11px}.ew-request-row .ew-card-title{gap:8px}}
@media(prefers-reduced-motion:reduce){.ew-shell *{transition:none!important}}

/* A standalone conversation uses the visible screen, with a stable composer. */
#app.ew-chat-active:has(.ew-shell){position:fixed;inset-inline:0;top:var(--ew-chat-top,0px);height:var(--ew-chat-height,100dvh);min-height:0;overflow:hidden;scroll-padding:0}
.ew-chat-active .ew-shell{height:100%;min-height:0;display:flex;flex-direction:column;font-size:16px}
.ew-chat-active .ew-header,.ew-chat-active .ew-nav,.ew-chat-active .ew-sync{display:none}
.ew-chat-active .ew-main{flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;width:100%;padding:0;margin:0 auto}
.ew-conversation{display:flex;flex-direction:column;flex:1;min-height:0;background:#f5f3fb;overflow:hidden}
.ew-chat-head{display:flex;align-items:center;gap:12px;flex-shrink:0;padding:calc(12px + env(safe-area-inset-top)) 16px 12px;background:#fff;border-bottom:1px solid #e5dfed;min-height:68px}
.ew-chat-head h2{font-size:18px;margin:0;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ew-chat-head .ew-btn{font-size:14px;padding:10px 14px;min-height:44px}.ew-chat-head .ew-avatar{width:38px;height:38px;border-radius:50%}
.ew-conversation .ew-thread{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding:18px 16px;gap:12px;scrollbar-gutter:stable}
.ew-conversation .ew-bubble p{font-size:16px;line-height:1.5}.ew-conversation .ew-bubble small{font-size:12px;line-height:1.4;color:#87759c}.ew-conversation .ew-empty{margin:auto}
.ew-conversation .ew-message-compose{flex-shrink:0;margin:0;padding:10px 12px max(12px,env(safe-area-inset-bottom));border-top:1px solid #e5dfed;background:#fff;gap:10px;align-items:flex-end}
.ew-conversation .ew-message-compose textarea{min-height:46px;max-height:140px;overflow-y:auto;resize:none;font-size:16px;line-height:22px;padding:11px 14px;border-radius:23px;outline-offset:0;scroll-margin:0}
.ew-conversation .ew-message-compose .ew-btn{min-height:46px;padding:11px 17px;border-radius:23px;font-size:16px}.ew-chat-keyboard .ew-conversation .ew-message-compose{padding-bottom:10px}
