/* Persistent navigation: a quiet desktop rail and a reachable mobile dock. */
.shell>.main{margin-left:86px}
.workspace-dock{position:fixed;inset:12px auto 12px 12px;width:64px;z-index:90;display:flex;align-items:center;flex-direction:column;padding:14px 5px;border:1px solid #e1e6ef;border-radius:23px;background:#f7f9fc;box-shadow:0 6px 25px #253d5d09;box-sizing:border-box}
.dock-brand{display:grid;place-items:center;padding:0;width:44px;height:44px;border:0;background:none;cursor:pointer;margin-bottom:28px}.dock-brand img{border-radius:11px}
.dock-destinations{display:flex;flex-direction:column;width:100%;gap:10px}
.dock-link{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;width:100%;min-height:48px;padding:6px 0;border:0;border-radius:15px;color:#67758a;background:none;cursor:pointer;font-family:inherit;transition:background .2s,color .2s,transform .2s}
.dock-symbol{display:grid;place-items:center;width:34px;height:34px;border-radius:12px}.dock-symbol svg{width:23px;height:23px}
.dock-link:hover{color:#235ba3;background:#eaf0f8}.dock-link:active{transform:scale(.94)}
.dock-link.active{background:linear-gradient(140deg,#e1ecff,#ebedfb);color:#2464be;box-shadow:inset 0 1px 0 #fff}
.dock-home{order:-1}.dock-label{display:none}.dock-tooltip{position:absolute;left:calc(100% + 14px);top:50%;transform:translateY(-50%) translateX(-4px);padding:8px 12px;border:1px solid #e3e8ef;border-radius:10px;background:#fff;color:#263b56;box-shadow:0 5px 18px #233c541a;white-space:nowrap;font:550 12px/1.3 system-ui;pointer-events:none;opacity:0;visibility:hidden;transition:.16s}
.dock-link:hover .dock-tooltip,.dock-link:focus-visible .dock-tooltip{opacity:1;visibility:visible;transform:translateY(-50%)}
.dock-link:focus-visible,.dock-brand:focus-visible,.account-profile:focus-visible{outline:3px solid #79a9eb;outline-offset:3px}
.topbar .breadcrumbs{min-width:0;flex:1}.topbar .top-actions{flex:none;flex-wrap:nowrap;width:auto;gap:12px}
.account-header{display:flex;align-items:center;gap:10px;flex:none}.account-profile{display:flex;align-items:center;gap:9px;border:0;background:none;padding:4px;border-radius:24px;cursor:pointer;color:#30425b;min-height:44px;font-family:inherit}.account-profile:hover{background:#e9eff8}.account-profile .profile-avatar{width:34px;height:34px;flex:none}.account-name{max-width:155px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600}.account-header .overflow-menu>summary,.account-header .notification-bell{width:44px;height:44px;box-sizing:border-box}
.topbar:has(.account-header .overflow-menu[open]){z-index:120!important;overflow:visible!important}.account-header .overflow-menu-items{min-width:230px;background:#fcfdff;max-height:calc(100dvh - 140px);overflow-y:auto}.account-header .overflow-menu-items .account-signout{color:#c44747}
.upload-tray{left:100px}
@media(max-width:1000px){.account-name{max-width:110px}.topbar .breadcrumbs>span{display:none}.topbar .top-client-select{max-width:155px}}
@media(max-width:760px){
 .shell>.main{margin-left:0}.shell>.main>.content{padding-bottom:calc(175px + env(safe-area-inset-bottom))}
 .workspace-dock{inset:auto 8px calc(7px + env(safe-area-inset-bottom)) 8px;width:auto;height:72px;padding:5px 3px;border-radius:25px;background:#f8fafff5;box-shadow:0 4px 30px #25436821,inset 0 1px #fff;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
 .dock-brand{display:none}.dock-destinations{flex-direction:row;gap:0;height:100%;align-items:center}.dock-link{flex:1;min-width:0;min-height:56px;height:100%;padding:3px 0;gap:1px;border-radius:17px}.dock-symbol{width:32px;height:30px}.dock-symbol svg{width:21px;height:21px}.dock-label{display:block;font-size:9px;line-height:14px;font-weight:550;letter-spacing:-.2px}.dock-tooltip{display:none}
 .dock-home{order:0;flex:1.2}.dock-home .dock-symbol{width:43px;height:37px;margin-top:-10px;background:linear-gradient(135deg,#5d8ce7,#706de0);border:2px solid #f9fbff;border-radius:15px;color:#fff;box-shadow:0 4px 12px #526ed035}.dock-home .dock-symbol svg{width:23px;height:23px}.dock-home.active{background:#eaf0fd}.dock-home.active .dock-symbol{box-shadow:0 4px 14px #526ed055}
 .shell .topbar{min-height:70px;height:auto;flex-wrap:nowrap;padding:10px 14px;gap:8px}.topbar .breadcrumbs{flex:1 1 auto;width:auto;font-size:12px;min-width:0}.topbar .breadcrumbs>span{display:none}.topbar .breadcrumbs>strong{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar .top-actions{width:auto;gap:5px}.topbar .top-client-select{display:none}.account-header{gap:3px}.account-name{max-width:76px;font-size:10px}.account-profile{gap:5px;padding:0}.account-profile .profile-avatar{width:30px;height:30px}.account-header .overflow-menu>summary,.account-header .notification-bell{width:44px;height:44px}.account-header .overflow-menu-items{position:fixed;top:72px;right:12px;max-width:calc(100vw - 24px)}
 .chat-dock{bottom:calc(90px + env(safe-area-inset-bottom));right:14px}.chat-drawer{max-height:calc(100dvh - 220px)}.chat-launcher{min-height:42px;padding:6px 12px!important}.chat-launcher small{display:none}
 .upload-tray{left:12px;bottom:calc(144px + env(safe-area-inset-bottom));width:min(330px,calc(100vw - 24px))}
 #toast{bottom:calc(94px + env(safe-area-inset-bottom))}
}
@media(max-width:360px){.account-name{display:none}.dock-label{font-size:8px}.workspace-dock{left:4px;right:4px}}
@media(max-height:620px) and (min-width:761px){.dock-brand{margin-bottom:10px}.dock-destinations{gap:3px}.dock-link{min-height:40px;padding:1px}}
@media(prefers-reduced-motion:reduce){.dock-link,.dock-tooltip{transition:none}}
@media(prefers-reduced-transparency:reduce){.workspace-dock{background:#f7f9fc;backdrop-filter:none;-webkit-backdrop-filter:none}}
@media print{.workspace-dock,.account-header{display:none!important}.shell>.main{margin-left:0}}
/* Keep an inactive toast completely off the dock, including after safe-area offsets. */
#toast:not(.show){visibility:hidden;opacity:0;pointer-events:none}
#toast.show{visibility:visible;opacity:1}
@media(max-width:360px){.workspace-dock{left:2px;right:2px;padding-inline:0}.dock-home{flex:1}}
/* Standalone account controls, without a banner or duplicate page heading. */
.shell .topbar{width:max-content;max-width:calc(100% - 32px);margin:12px 20px 0 auto;padding:0;height:44px;min-height:44px;border:0;border-radius:0;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;isolation:auto;justify-content:flex-end}
.shell .topbar::before,.shell .topbar::after{display:none!important}
.account-header .account-profile{padding:0;min-width:44px;height:44px;min-height:44px;border-radius:13px;background:none}
.account-header .account-profile .profile-avatar{width:44px;height:44px;border-radius:13px;box-sizing:border-box;border:1px solid #ffffffdf;background:#e9edf5}
.account-header .account-profile .profile-avatar img{width:100%;height:100%;border-radius:12px;object-fit:cover}
.account-header .account-name{display:none}
.main>.content>.top-client-select{margin-bottom:20px;min-height:44px;max-width:100%;font-size:12px}
@media(max-width:760px){.shell .topbar{margin:12px 16px 0 auto;top:12px}.account-header{gap:8px}.account-header .overflow-menu-items{top:66px}.notification-panel{top:66px}.shell .main>.content{padding-top:20px}}
/* The client icon opens only the workspace picker, anchored to the rail/dock. */
.dock-client-picker{display:block;position:relative;width:100%;flex:none}
.dock-client-picker>summary.dock-link{box-sizing:border-box;width:100%;height:auto;min-height:48px;padding:6px 0;border:0;border-radius:15px;box-shadow:none;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;list-style:none}
.dock-client-picker>summary.dock-link svg{width:23px;height:23px;fill:none}
.dock-client-picker>summary.dock-link.active,.dock-client-picker[open]>summary.dock-link{background:linear-gradient(140deg,#e1ecff,#ebedfb);color:#2464be;box-shadow:inset 0 1px 0 #fff}
.dock-client-picker>summary.dock-link:hover{background:#eaf0f8;color:#235ba3}
.dock-client-picker[open] .dock-tooltip{display:none}
.dock-client-popover{position:absolute;left:calc(100% + 16px);bottom:0;width:270px;max-width:calc(100vw - 110px);padding:8px;border:1px solid #e0e6ef;border-radius:21px;background:#fcfdff;box-shadow:0 16px 48px #263d6026,0 3px 8px #263d600c;color:#30425b;animation:client-picker-in .18s ease-out;transform-origin:left bottom;z-index:100}
.dock-client-heading{padding:10px 12px 12px;font-size:11px;font-weight:600;color:#7a8799;letter-spacing:.02em}
.dock-client-list{max-height:min(320px,calc(100dvh - 200px));overflow-y:auto;overscroll-behavior:contain}
.dock-client-option{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:10px;border:0;border-radius:13px;background:none;color:inherit;font-family:inherit;font-size:13px;font-weight:600;line-height:1.4;text-align:left;cursor:pointer}
.dock-client-option>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}
.dock-client-option:hover,.dock-client-option.current{background:#edf3fc;color:#2464be}
.dock-client-avatar{display:grid;place-items:center;width:40px;height:40px;flex:none;border-radius:11px;background:#eff2f7;color:#67758a;font-size:12px}
.dock-client-avatar img{max-width:34px;max-height:32px;object-fit:contain}
.dock-client-arrow{font:16px system-ui;color:#8398b2;flex:none}
.dock-client-all{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;margin-top:6px;padding:10px 12px;border:0;border-top:1px solid #e8edf4;background:none;color:#456eab;font:550 12px system-ui;cursor:pointer}
.dock-client-all:hover{background:#edf3fc;border-radius:10px}.dock-client-option:focus-visible,.dock-client-all:focus-visible{outline:2px solid #79a9eb;outline-offset:-2px}.dock-clients-empty{padding:10px 12px;font-size:12px;color:#7a8799}
@keyframes client-picker-in{from{opacity:0;transform:translateX(-5px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:760px){.dock-client-picker{flex:1;min-width:0;height:100%;width:auto}.dock-client-picker>summary.dock-link{height:100%;min-height:56px;padding:3px 0;border-radius:17px;gap:1px}.dock-client-picker>summary.dock-link svg{width:21px;height:21px}.dock-client-popover{position:absolute;left:auto;right:0;bottom:calc(100% + 16px);width:280px;max-width:calc(100vw - 24px);transform-origin:right bottom;animation-name:notification-appear}}
@media(prefers-reduced-motion:reduce){.dock-client-popover{animation:none}}

.dock-client-avatar.brand-pain-academy{background:#293447}

/* Owner-only client preview stays visible beside the account controls. */
.account-header .client-view-picker>summary{display:flex;align-items:center;justify-content:center;gap:9px;width:auto;max-width:230px;height:44px;padding:0 13px;border:1px solid #dbe4f0;border-radius:14px;background:#f8faff;color:#425b7c;box-shadow:0 2px 7px #33496b08;font:550 12px system-ui;list-style:none;cursor:pointer}
.client-view-picker>summary::-webkit-details-marker{display:none}.client-view-picker>summary>span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.account-header .client-view-picker>summary svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;flex:none}.account-header .client-view-picker>summary .client-view-chevron{width:12px;height:12px}.account-header .client-view-picker.is-preview>summary,.account-header .client-view-picker[open]>summary{background:#eaf2ff;border-color:#b9cff0;color:#2563b5}
.client-view-picker{position:relative}.client-view-popover{position:absolute;top:calc(100% + 10px);right:0;width:280px;max-width:calc(100vw - 24px);box-sizing:border-box;padding:8px;border:1px solid #dfe6f0;border-radius:20px;background:#fcfdff;box-shadow:0 16px 48px #263d6026,0 3px 8px #263d600c;color:#30425b;z-index:120;animation:notification-appear .18s ease-out}.client-view-help{margin:8px 12px;font-size:11px;line-height:1.5;color:#7a8799}.client-view-picker>summary:focus-visible{outline:2px solid #79a9eb;outline-offset:3px}.client-preview-bar .btn{margin-left:auto;min-height:36px}
@media(max-width:760px){.account-header .client-view-picker>summary{max-width:calc(100vw - 188px);gap:7px;padding-inline:10px;font-size:11px}.client-view-popover{position:fixed;top:66px;right:12px}.client-preview-bar small{order:2;width:100%;margin-left:0}.client-preview-bar .btn{font-size:11px}}
@media(prefers-reduced-motion:reduce){.client-view-popover{animation:none}}
