/* Consistent workspace shell. Page actions and record tabs remain owned by each page. */
:root{--ws-side:228px;--ws-panel:#fffefa;--ws-bg:#f6f4ef;--ws-text:#272923;--ws-muted:#62665b;--ws-line:#dfdfd6;--ws-raised:#f3f2eb;--ws-gold:#d7b85f;--ws-gold-soft:#f3ecd4;--ws-gold-text:#756124}
html[data-theme=dark]{--ws-panel:#1a1c16;--ws-bg:#10120e;--ws-text:#eeeede;--ws-muted:#b2b6a5;--ws-line:#33372b;--ws-raised:#25291f;--ws-gold-soft:#34301c;--ws-gold-text:#dbc16e}
html body.shell{padding:66px 0 0 var(--ws-side);--side:var(--ws-side)}
html body.shell.nav-rail{--ws-side:76px}
html body.shell .side{inset:0 auto 0 0;width:var(--ws-side);border:0;border-right:1px solid var(--ws-line);border-radius:0;background:var(--ws-panel);color:var(--ws-text);box-shadow:none;padding:25px 12px 16px;display:flex;flex-direction:column;overflow:hidden;z-index:80}
html body.shell .side .logo{padding:0 10px;gap:12px;flex:none}
html body.shell .side .mk{background:#f4e9d1;border-radius:8px;width:36px;height:40px}
html body.shell .side .mk img{width:29px;height:32px;object-fit:contain;filter:none}
html body.shell .side .wm{color:var(--ws-text);font:700 22px/30px Arial,sans-serif;letter-spacing:.22em}
html body.shell .side .ws{color:var(--ws-muted);font:10px/16px Arial,sans-serif;letter-spacing:.12em;padding:23px 10px 14px;margin:0;border:0;flex:none}
html body.shell .side nav{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:4px;margin:0;padding:0}
html body.shell .side nav a,html body.shell .side .nav-parent{display:flex;align-items:center;gap:10px;width:100%;min-height:39px;padding:9px 11px;background:none;border:0;border-radius:7px;color:var(--ws-muted);font:400 12px/20px Arial,sans-serif;text-align:left;box-shadow:none;cursor:pointer;letter-spacing:0;white-space:normal;text-decoration:none;transform:none}
html body.shell .side nav a:before{display:none}
html body.shell .side nav a svg,html body.shell .side .nav-parent svg{width:18px;height:18px;flex:none;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;transform:none}
html body.shell .side nav a:hover,html body.shell .side .nav-parent:hover{background:var(--ws-raised);color:var(--ws-text)}
html body.shell .side nav a.on{background:var(--ws-gold);color:#292312;font-weight:600}
html body.shell .side .nav-parent.current{background:var(--ws-gold-soft);color:var(--ws-gold-text)}
.nav-parent .chev{margin-left:auto}.nav-parent[aria-expanded=true] .chev{transform:rotate(90deg)}
html body.shell .side .nav-group{margin:0;padding:0;border:0;flex:none}
.nav-children{margin:3px 0 8px 19px;border-left:1px solid var(--ws-line);padding-left:10px}.nav-children[hidden]{display:none}
html body.shell .side .nav-children a{min-height:32px;padding:7px 8px}
.nav-children .external{margin-left:auto;font-size:10px}.side .nav-unread{margin-left:auto;font-size:10px}
html body.shell .side .foot{flex:none;border-top:1px solid var(--ws-line);margin:12px 8px 0;padding:9px 0 0}
html body.shell .side .foot a,html body.shell .side .foot button{color:var(--ws-muted);font-size:11px;border-radius:6px}
html body.shell .side .foot>a,html body.shell .side .foot>button{min-height:28px;margin:0;padding:5px 0}
html body.shell .side .foot .user{background:transparent;padding:12px 0 0;margin:6px 0 0;border-radius:0;border-top:1px solid var(--ws-line)}
html body.shell .side .user .who-name b{color:var(--ws-text);font-size:12px}html body.shell .side .user .who-name span{color:var(--ws-muted);font-size:10px}
html body.shell .side .nav-fold{display:none}
html body.shell header.top{position:fixed;inset:0 0 auto var(--ws-side);height:66px;margin:0;background:var(--ws-panel);color:var(--ws-text);border:0;border-bottom:1px solid var(--ws-line);border-radius:0;box-shadow:none;backdrop-filter:none;z-index:60}
html body.shell header.top:before{display:none}html body.shell header.top .wrap{height:100%;max-width:none;display:flex;align-items:center;gap:12px;padding:0 22px}
html body.shell .top .brand,html body.shell .top .who,html body.shell .top .mlogo{display:none}
html body.shell .top .crumb{display:flex;align-items:center;gap:7px;min-width:0;font:11px/18px Arial,sans-serif;color:var(--ws-muted);margin:0}
html body.shell .top .crumb b{font-weight:600;color:var(--ws-text)}
html body.shell .top .menu,html body.shell .top .gsbtn,html body.shell .top .nbell{display:flex;align-items:center;justify-content:center;position:static;flex:none;background:transparent;color:var(--ws-text);border:1px solid var(--ws-line);border-radius:7px;min-width:34px;height:34px;padding:7px;box-shadow:none}
html body.shell .top .menu svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5}
html body.shell .top .gsbtn{gap:9px;padding:7px 10px;font-size:11px;margin-left:auto}html body.shell .top .gsbtn span{display:inline}
html body.shell .top .sp{flex:1}html body.shell .top .gsbtn kbd{font-size:10px}
html body.shell .top .menu{order:-3}html body.shell .top #hubNav{order:-2;margin:0;display:flex;gap:4px}html body.shell .top .crumb{order:-1}
html body.shell .top #hubNav button{min-width:32px;height:32px;border:1px solid var(--ws-line);border-radius:7px;background:transparent;color:var(--ws-text)}
html body.shell .top .gsbtn{order:1}html body.shell .top .hub-theme{order:2}html body.shell .top .nbell{order:3;position:relative}
.hub-theme{display:flex;flex:none;padding:3px;gap:2px;background:var(--ws-raised);border:1px solid var(--ws-line);border-radius:7px}
.hub-theme button{padding:6px 8px;border:0;border-radius:4px;background:transparent;color:var(--ws-muted);font:11px/16px Arial,sans-serif;cursor:pointer}
.hub-theme button[aria-pressed=true]{background:var(--ws-panel);color:var(--ws-text);box-shadow:0 1px 3px #0002}
body.shell .hub-tabbar,body.shell .ptabs,body.shell .topnav{display:none!important}
body.shell[data-workspace-page="/manage"] .tabs2,body.shell[data-workspace-page="/admin-data"] .ad-tabs{display:none}
html body.shell .hero{padding-top:24px;animation:none}html body.shell .hero h1{font:700 27px/1.25 Arial,Helvetica,sans-serif;letter-spacing:-.02em;text-transform:none}html body.shell .hero h1:after{display:none}
html body.shell .wrap{max-width:none;padding-left:28px;padding-right:28px}html body.shell .hero p{font-size:13px}html body.shell .hero .eyebrow{font-size:10px;letter-spacing:.1em}
html body.shell .reveal,html body.shell .reveal:not(.in){opacity:1;transform:none;animation:none}
html body.shell .side .gsn{display:none}
html body.shell.nav-rail .side .wm,html body.shell.nav-rail .side .ws,html body.shell.nav-rail .side nav a>span,html body.shell.nav-rail .side .nav-parent>span,html body.shell.nav-rail .side .foot>a,html body.shell.nav-rail .side .foot>button,html body.shell.nav-rail .side .who-name{display:none}
html body.shell.nav-rail .side .nav-children{display:none}html body.shell.nav-rail .side nav a,html body.shell.nav-rail .side .nav-parent{justify-content:center;padding:10px}
html body.shell.nav-rail .side .logo{padding:0;justify-content:center}html body.shell.nav-rail .side .foot{margin:12px 0 0}
body.shell :is(.side,.top) :focus-visible{outline:2px solid var(--ws-gold-text);outline-offset:3px}
body.shell.chat .chat-app{height:calc(100dvh - 66px)}
@media(max-width:900px){html body.shell,html body.shell.nav-rail{padding-left:0;--ws-side:228px}html body.shell header.top{left:0}html body.shell .side{transform:translateX(-100%);transition:transform 140ms ease-out}html body.shell.nav-open .side{transform:none}html body.shell.nav-open .scrim{display:block;position:fixed;inset:0;background:#0008;z-index:79}html body.shell .top .gsbtn span,html body.shell .top .gsbtn kbd{display:none}html body.shell .top .crumb{flex:1}html body.shell .top .sp{display:none}}
@media(max-width:560px){html body.shell{padding-top:90px}html body.shell header.top{height:90px}html body.shell header.top .wrap{padding:8px 14px;gap:8px;flex-wrap:wrap}html body.shell .top .crumb{order:10;flex-basis:100%;height:20px;overflow:hidden;white-space:nowrap}html body.shell .top .gsbtn{margin-left:auto}html body.shell .top #hubNav{display:none}.hub-theme button{padding:6px}html body.shell .wrap{padding-left:16px;padding-right:16px}html body.shell .hero h1{font-size:24px}body.shell.chat .chat-app{height:calc(100dvh - 90px)}}
/* Native navigation keeps URLs, downloads, auth, page scripts and browser history intact. */
@view-transition{navigation:auto}
body.shell .side{view-transition-name:workspace-nav}body.shell header.top{view-transition-name:workspace-header}
::view-transition-group(root){animation-duration:140ms}::view-transition-old(root){animation-duration:140ms}::view-transition-new(root){animation-duration:140ms}
::view-transition-old(workspace-nav),::view-transition-new(workspace-nav),::view-transition-old(workspace-header),::view-transition-new(workspace-header){animation:none;mix-blend-mode:normal}
@media(prefers-reduced-motion:reduce){@view-transition{navigation:none}body.shell .side{transition:none}::view-transition-group(*){animation:none}}

/* Section colours keep a consistent meaning in both modes; labels and active markers also identify location. */
.side [data-nav-key]{--nav-tone:#826117;--nav-wash:#f5edda;--nav-ink:#fff}
.side [data-nav-key=calls]{--nav-tone:#146c63;--nav-wash:#e1f2ed}
.side [data-nav-key=clients]{--nav-tone:#2b5fa1;--nav-wash:#e6eef9}
.side [data-nav-key=money]{--nav-tone:#376b35;--nav-wash:#e8f1df}
.side [data-nav-key=performance]{--nav-tone:#7752ac;--nav-wash:#efe8f8}
.side [data-nav-key=messages]{--nav-tone:#116b7d;--nav-wash:#e0f1f5}
.side [data-nav-key=inbox]{--nav-tone:#9b4f22;--nav-wash:#faeadc}
.side [data-nav-key=team]{--nav-tone:#a23e69;--nav-wash:#f7e5ed}
.side [data-nav-key=toolkit]{--nav-tone:#9a482c;--nav-wash:#f8e9e1}
.side [data-nav-key=admin]{--nav-tone:#4d637b;--nav-wash:#e7edf3}
.side [data-nav-key=reference]{--nav-tone:#5859a6;--nav-wash:#ebebf8}
.side [data-nav-key=files]{--nav-tone:#3f7062;--nav-wash:#e5f1ec}
html[data-theme=dark] .side [data-nav-key]{--nav-tone:#dfc375;--nav-wash:#34301e;--nav-ink:#111b19}
html[data-theme=dark] .side [data-nav-key=calls]{--nav-tone:#72cbbb;--nav-wash:#19352e}
html[data-theme=dark] .side [data-nav-key=clients]{--nav-tone:#8bb8ee;--nav-wash:#1d2e42}
html[data-theme=dark] .side [data-nav-key=money]{--nav-tone:#a1cb80;--nav-wash:#2b3520}
html[data-theme=dark] .side [data-nav-key=performance]{--nav-tone:#bba0e9;--nav-wash:#30243e}
html[data-theme=dark] .side [data-nav-key=messages]{--nav-tone:#75c8dd;--nav-wash:#18353c}
html[data-theme=dark] .side [data-nav-key=inbox]{--nav-tone:#e9b076;--nav-wash:#3c2b1d}
html[data-theme=dark] .side [data-nav-key=team]{--nav-tone:#e5a0bc;--nav-wash:#3c2531}
html[data-theme=dark] .side [data-nav-key=toolkit]{--nav-tone:#eaa38b;--nav-wash:#3c2920}
html[data-theme=dark] .side [data-nav-key=admin]{--nav-tone:#a2bad5;--nav-wash:#27313c}
html[data-theme=dark] .side [data-nav-key=reference]{--nav-tone:#a8abeb;--nav-wash:#2b2d42}
html[data-theme=dark] .side [data-nav-key=files]{--nav-tone:#8fcab5;--nav-wash:#22372f}
html body.shell .side .nav-parent,html body.shell .side nav>a[data-nav-key]{padding:7px 9px;color:var(--nav-tone);font-weight:500}
html body.shell .side .nav-parent>svg,html body.shell .side nav>a[data-nav-key]>svg{width:28px;height:28px;padding:5px;border-radius:7px;color:var(--nav-tone);background:var(--nav-wash)}
html body.shell .side .nav-parent.current{color:var(--nav-tone);background:var(--nav-wash);box-shadow:none}
html body.shell .side .nav-parent.current>svg{background:transparent}
html body.shell .side nav a.on{background:var(--nav-tone);color:var(--nav-ink);font-weight:600}
html body.shell .side nav>a.on[data-nav-key]>svg{background:transparent;color:inherit}
html body.shell .side .nav-parent[aria-expanded=true]+.nav-children{border-color:var(--nav-tone)}

html body.shell .side :is(.nav-unread,.nav-count){margin-left:auto;border-radius:5px;padding:1px 5px;font:600 10px/16px Arial,sans-serif;background:var(--nav-wash);color:var(--nav-tone);white-space:nowrap}
html body.shell .side a.on :is(.nav-unread,.nav-count){background:transparent;color:inherit}
html body.shell .side [hidden]{display:none!important}
body.shell .panel-reopen{position:static;writing-mode:horizontal-tb;margin:0 0 12px;transform:none}
body.shell .panel-reopen[hidden],body.shell .fold-tab{display:none!important}
@media(max-width:999px){body.shell .panel-reopen{display:none}}
.job-scope{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:18px}
.job-scope button{padding:9px 15px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font-family:inherit;font-size:13px;font-weight:600;line-height:1.3;cursor:pointer}
.job-scope button[aria-pressed=true]{background:var(--ink);color:var(--paper)}
.job-scope [hidden]{display:none!important}
.job-scope #jobScopeNote{color:var(--muted);font-size:12px;margin-left:4px}
/* Account tax submissions are a reminder after sign-in, never an authentication bypass or work blocker. */
.tax-account-notice{margin:16px 24px;padding:14px 18px;background:var(--gold-wash);border:1px solid var(--border);border-radius:8px;font:400 14px/1.5 var(--sans)}
.tax-account-notice strong{margin-right:12px}.tax-account-notice a{font-weight:600}.tax-account-notice span{display:block;color:var(--text-2);font-size:12px;margin-top:4px}

/* Readable workspace controls; retain the established page structure and colours. */
html body.shell .side nav a,html body.shell .side .nav-parent{font-size:14px;line-height:20px}
html body.shell .side .foot a,html body.shell .side .foot button{font-size:13px}
html body.shell .hero p{font-size:16px;line-height:1.5;max-width:80ch}
body.shell #hubDialog{padding:16px;overflow-y:auto;overscroll-behavior:contain}
body.shell #hubDialog .box{max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;min-width:0}
body.shell #hubDialog .dbody{min-width:0}
body.shell #hubDialog :is(input,select,textarea){max-width:100%}
body.shell #hubDialog :is(button,a,input,select,textarea):focus-visible{outline:2px solid var(--ws-gold-text);outline-offset:3px}
@media(max-width:900px){
  html body.shell .side{width:min(288px,calc(100vw - 48px));padding-top:18px}
  html body.shell .side :is(nav a,.nav-parent,.foot>a,.foot>button){min-height:44px}
  html body.shell .side .nav-children a{min-height:44px;padding:10px 8px}
  html body.shell .side .foot a,html body.shell .side .foot button{font-size:14px}
  html body.shell .top :is(.menu,.gsbtn,.nbell){min-width:44px;height:44px}
  .hub-theme button{min-height:38px;min-width:44px;font-size:12px}
  body.shell #hubDialog .dbody :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){font-size:16px;min-height:44px}
  body.shell #hubDialog .dbody label{font-size:14px;line-height:1.4}
  body.shell #hubDialog .dbody button{min-height:44px}
  html body.shell.nav-open{overflow:hidden}
}
@media(max-width:560px){
  body.shell #hubDialog{padding:8px;align-items:flex-start}
  body.shell #hubDialog .box{max-height:calc(100dvh - 16px);padding:16px;border-radius:14px;width:100%}
  body.shell #hubDialog .dbody .fl{grid-template-columns:minmax(0,1fr)}
  .tax-account-notice{margin:12px 16px}
}
@media(max-width:900px) and (max-height:620px){
  html body.shell .side{overflow-y:auto}
  html body.shell .side nav{flex:none;overflow:visible}
}
