/* Shared operating UI repair. Loaded last to unify legacy surface styles. */
:root{--font-ui:"Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;--font-display:"Instrument Serif",Georgia,serif;--muted:#b3bbad;--radius-control:10px}
html,body,button,input,select,textarea{font-family:var(--font-ui)}
html{color-scheme:dark;scrollbar-color:#69735d #182019;scrollbar-width:thin}html[data-theme="light"]{color-scheme:light;--muted:#515b4d;--lime:#d8ff5f;--panel:rgba(255,255,255,.83);--panel2:#f1f4ed;--shell:rgba(247,249,243,.9);scrollbar-color:#88947c #edf1e7}
::selection{background:#d8ff5f;color:#192015}input,textarea{caret-color:var(--text)}a{text-underline-offset:3px}button,a,input,select,textarea{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--lime);outline-offset:4px}html[data-theme="light"] :is(button,a,input,select,textarea):focus-visible{outline-color:#466b17}
body:not(.auth-screen)::before{inset:0;animation:none!important;transform:none!important;will-change:auto;background-position:center;opacity:.4;filter:saturate(.5) brightness(.47)}
body:not(.auth-screen)::after{background:linear-gradient(130deg,#10180c54,#050805c9)}
html[data-theme="light"] body:not(.auth-screen)::before{opacity:.12;filter:saturate(.3) brightness(1.3)}html[data-theme="light"] body:not(.auth-screen)::after{background:linear-gradient(130deg,#e9efdc77,#f7f9f1c4)}
.content.page-enter>*,.signin-card h1 .reveal-char,.content h1 .reveal-char{animation:none!important}
.content :is(h1,h2,h3){text-wrap:balance;letter-spacing:-.02em}.heading h1,.today-heading h1,.sample-page-head h1{font-size:48px;line-height:1.08;font-style:italic;font-weight:400;overflow-wrap:normal}
.content :is(.panel-head h2,.upgrade-section h2,.settings-card h2,.sample-card h2,.revenue-outlook h2),.modal>header h2{font:400 27px/1.15 var(--font-display);letter-spacing:-.012em}.content :is(.upgrade-section h3,.client-timeline h3,.employee-title h2){font:400 22px/1.2 var(--font-display)}
.content :is(table,.metric strong,.stage-tile strong,.invoice-total-row,.sample-stat){font-family:var(--font-ui);font-style:normal;font-variant-numeric:tabular-nums lining-nums}
.content :is(.eyebrow,.tiny):not(.status){letter-spacing:.04em;text-transform:none;font-size:11px}.heading .eyebrow,.sample-page-head .eyebrow,.signin-card>.eyebrow{display:none}
.topbar{min-height:66px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding-block:12px}.topbar>span{font-size:11px;line-height:1.4;letter-spacing:.035em;white-space:nowrap}.top-actions{align-items:center;gap:8px}.topbar .role-chip{font-size:11px;padding:9px 13px;white-space:nowrap}.brand-lockup strong{font-size:12px;line-height:1.3}.brand-lockup small{font-size:9px;line-height:1.4;letter-spacing:.06em}
/* Each route shares one viewport-height rail, with its own scrollable menu. */
@media(min-width:741px){.layout{overflow:clip;min-height:calc(100dvh - 28px)}.sidebar{position:fixed;top:15px;bottom:15px;left:15px;height:calc(100dvh - 30px);min-height:0;display:flex;flex-direction:column;gap:0;overflow:hidden;padding:18px 15px;transform:translateX(-178px)}.sidebar nav,.sidebar.expanded nav{display:flex;flex:1 1 0;min-height:0;overflow-y:auto;justify-content:flex-start;gap:0;scrollbar-width:thin;scrollbar-color:var(--line) transparent;overscroll-behavior:contain;padding-block:4px}.sidebar .nav-group,.sidebar.expanded .nav-group{display:grid;flex:none;gap:3px;margin:0 0 12px}.sidebar .nav{flex:none;min-height:42px;height:42px;margin-right:17px}.sidebar.expanded .nav{min-height:42px;font-size:12px}.sidebar .brand-lockup{flex:none;min-height:54px;margin-bottom:12px}.sidebar .side-foot{flex:none;margin-top:8px}.sidebar.expanded .nav-group>span{font-size:9px;line-height:1.4;padding-bottom:7px}.main{min-height:calc(100dvh - 28px)}}
button,input,select,textarea{font-size:13px}button:disabled{opacity:.48;cursor:not-allowed;filter:saturate(.5)}:is(.primary,.outline){min-height:40px;padding:10px 14px;border-radius:10px;font-size:12px;line-height:1.3;transition:background 160ms,border-color 160ms,box-shadow 160ms}.primary{background:#d8ff5f;color:#192015;border-color:#e7ff9c}.primary:hover{background:#e3ff85;box-shadow:0 5px 14px #14200c24}.outline{background:var(--panel);color:var(--text)}.outline:hover{background:var(--panel2);border-color:var(--muted)}
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),select,textarea{border-radius:10px;border:1px solid color-mix(in srgb,var(--text) 25%,transparent);background:var(--panel2);color:var(--text);min-height:42px;font-size:13px;line-height:1.4;padding:10px 12px}input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}select option{color:var(--text);background:var(--panel2)}label{line-height:1.45}.form-grid label,.auth-form label{font-size:12px;gap:7px}
/* Preserve native checkbox keyboard, indeterminate, and accessibility states. */
input[type="checkbox"],input[type="radio"]{appearance:auto!important;-webkit-appearance:auto!important;accent-color:#d8ff5f;width:18px!important;height:18px!important;min-width:18px;min-height:18px!important;padding:0!important;margin:2px 8px 2px 0!important;flex:none;vertical-align:middle;cursor:pointer;box-shadow:none!important;transform:none!important}html[data-theme="light"] input:is([type="checkbox"],[type="radio"]){accent-color:#517522}.check,.check-label,label:has(>input[type="checkbox"]){display:flex;align-items:center;gap:8px;min-height:36px;line-height:1.45;text-align:left}input:is([type="date"],[type="datetime-local"],[type="time"]){min-width:0;max-width:100%;font-variant-numeric:tabular-nums}input::-webkit-calendar-picker-indicator{cursor:pointer;opacity:.8;padding:4px}
.table-wrap{overflow-x:auto}th{font-size:11px;line-height:1.4;letter-spacing:.025em;color:var(--muted);background:var(--panel2)}td{font-size:13px;line-height:1.5;padding:16px}td small{font-size:11px;line-height:1.5;margin-top:4px;color:var(--muted)}table .text-button,.activity-row .text-button,.notification-history .text-button{min-height:34px;padding:7px 12px;border:1px solid var(--line);border-radius:9px;color:var(--text);font-size:11px;background:var(--panel2);text-decoration:none}.text-button:hover{text-decoration:underline}.cell-actions{gap:8px}
.role-preview-grid{gap:12px}.role-preview-grid button{display:flex;min-height:152px;flex-direction:column;gap:12px;padding:18px;align-items:flex-start;justify-content:flex-start}.role-preview-grid strong{font-size:17px;line-height:1.3}.role-preview-grid small{display:block;margin:0;font-size:12px;line-height:1.5;color:var(--muted)}.role-preview-grid b{display:block;margin-top:auto;padding-top:8px;font-size:11px;line-height:1.4;color:var(--text)}
.settings-choices>button{gap:8px;min-height:74px}.settings-card p,.upgrade-section>header p{font-size:12px;line-height:1.6;color:var(--muted)}.access-note{font-size:12px;line-height:1.6}
/* A real heading box prevents staggered letter spans from colliding. */
.auth-screen .gate{overflow-y:auto;align-items:center;justify-content:center;padding:30px 16px}.auth-screen .signin-card{width:min(444px,100%);padding:32px;flex-shrink:0;text-align:left}.auth-screen .signin-card h1{display:block;width:auto;max-width:none;margin:18px 0 12px;font:italic 400 52px/1.16 var(--font-display);letter-spacing:-.025em;white-space:normal;overflow:visible;overflow-wrap:normal;word-break:normal;text-align:left}.auth-screen .signin-card h1 span{position:static;display:inline;line-height:inherit}.auth-screen .signin-card>p{margin:0 0 22px;font-size:13px;line-height:1.6;color:#bcc5b6;text-align:left}.auth-screen .signin-card .auth-form{gap:14px}.auth-screen .signin-logo{width:46px;height:46px;border-radius:13px}.auth-screen .signin-card .reset-password{text-align:right;justify-self:end;font-size:12px;margin-top:-5px}.auth-screen .auth-note{font-size:11px;line-height:1.5;color:#bdc6b7}.auth-screen .auth-motion:before,.auth-screen .auth-motion:after{animation:none!important}.auth-screen .auth-buttons{gap:10px}.auth-screen .signin-card .auth-buttons button{min-height:44px;font-size:13px}.auth-screen .signin-card .auth-alert{font-size:12px;line-height:1.5}.auth-screen .signin-card label{color:inherit}html[data-theme="light"] .auth-screen .signin-card>p,html[data-theme="light"] .auth-screen .auth-note{color:#515d4a}
html[data-theme="light"] :is(.sidebar,.mobile-drawer){background:rgba(244,247,237,.96);color:#192015}html[data-theme="light"] :is(.sidebar .nav,.mobile-drawer .nav){color:#394633}html[data-theme="light"] :is(.sidebar .nav.active,.mobile-drawer .nav.active){color:#17200d;background:#d8ff5f}html[data-theme="light"] .topbar{background:#f4f7eee0}html[data-theme="light"] :is(.outline,.role-chip,.search-trigger,.top-icon,.text-button){color:#25321d}html[data-theme="light"] .text-button.danger{color:#a1252d}html[data-theme="light"] :is(.account-actions,.control-popover,.quick-panel){background:#f6f9f0;color:#1a2214}html[data-theme="light"] :is(.sample-card p,.panel p,.role-preview-grid small,.sample-meeting small,.portal-note p){color:#515b4d}html[data-theme="light"] .signin-card{background:#f7f9f2e8}
@media(max-width:900px) and (min-width:741px){.sidebar{top:0;bottom:0;left:0;height:100dvh}.topbar{padding-inline:18px}.heading h1,.sample-page-head h1{font-size:42px}}
@media(max-width:740px){.heading h1,.today-heading h1,.sample-page-head h1{font-size:38px;line-height:1.12}.content :is(.panel-head h2,.upgrade-section h2,.settings-card h2,.sample-card h2){font-size:25px}.topbar{gap:8px;min-height:60px;padding:10px 12px}.topbar>span{display:none}.top-actions{gap:6px}.topbar .role-chip{max-width:105px;overflow:hidden;text-overflow:ellipsis;font-size:10px;padding:8px 10px}.mobile-drawer nav{min-height:0;flex:1;overflow-y:auto;justify-content:flex-start;gap:0}.mobile-drawer .nav-group{flex:none;gap:3px;margin:0 0 14px}.mobile-drawer .side-foot{flex:none}.role-preview-grid{grid-template-columns:1fr}.role-preview-grid button{min-height:130px}.auth-screen .gate{justify-content:flex-start;padding-block:24px}.auth-screen .signin-card{padding:24px;max-width:420px;margin:auto}.auth-screen .signin-card h1{font-size:44px;line-height:1.17}.table-wrap td{padding:13px;min-width:90px}.modal{padding:20px}.form-grid{column-gap:12px;row-gap:14px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

.top-actions .workspace-appearance{position:relative;display:flex;align-items:center;gap:7px}.workspace-appearance .control-popover{top:44px;right:0}
@media(max-width:740px){.top-actions .workspace-appearance{display:none}}

html[data-theme="light"] .mobile-menu-toggle span{background:#25321d}
.form-grid label{color:var(--text)}
.billing-paper table{min-width:0;table-layout:fixed}
.billing-paper table th:first-child{width:48%}
