/* New onboarding surface only. No global button, menu or theme overrides. */
#newFirmWorkspace .ob-shared-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.85fr);gap:16px;align-items:start}
#newFirmWorkspace .ob-client{padding:0;min-width:0}
#newFirmWorkspace .ob-hero{display:flex;justify-content:space-between;gap:16px;padding:16px;border:1px solid var(--premium-line);border-radius:12px;background:var(--premium-paper)}
#newFirmWorkspace .ob-hero h1{font-size:var(--fs-2xl,22px);--crm-type-heading:var(--fs-2xl,22px);margin:6px 0;overflow-wrap:anywhere}
#newFirmWorkspace .ob-hero p{margin:4px 0;color:var(--premium-muted)}
#newFirmWorkspace .ob-hero>div:last-child{display:grid;align-content:center;gap:4px}
#newFirmWorkspace .ob-progress{display:flex;gap:8px;overflow:auto;padding:16px 0;scrollbar-width:thin}
#newFirmWorkspace .ob-progress>span{min-width:88px;max-width:110px;flex:1 0 88px;border:1px solid var(--premium-line);border-radius:8px;padding:8px;color:var(--premium-muted);font-size:var(--fs-sm,12.5px)}
#newFirmWorkspace .ob-progress small{display:block;line-height:1.3;margin-top:4px}
#newFirmWorkspace .ob-progress .current{border-color:var(--crm-review-line);background:var(--crm-review-surface);color:var(--crm-review-ink)}
#newFirmWorkspace .ob-progress .done{color:var(--green);border-color:color-mix(in srgb,var(--green) 45%,var(--premium-line))}
#newFirmWorkspace .ob-now{padding:18px;border:1px solid var(--premium-line);border-radius:12px;margin-bottom:14px}
#newFirmWorkspace .ob-now h2{margin:12px 0;font-size:var(--fs-xl,17px);--crm-type-heading:var(--fs-xl,17px)}
#newFirmWorkspace .ob-instruction{white-space:pre-wrap;line-height:1.7;overflow-wrap:anywhere}
#newFirmWorkspace .ob-supervision{min-width:0;border:1px solid var(--premium-line);border-radius:12px;padding:14px;background:var(--premium-paper)}
#newFirmWorkspace .ob-supervision h2{font-size:var(--fs-xl,17px);--crm-type-heading:var(--fs-xl,17px)}
#newFirmWorkspace .ob-supervision form{margin:12px 0;gap:14px}
#newFirmWorkspace .ob-step-nav{display:flex;overflow:auto;gap:6px;padding:8px 0 12px}
#newFirmWorkspace .ob-step-nav button{flex:0 0 125px;white-space:normal;text-align:left;line-height:1.4;padding:8px}
#newFirmWorkspace :is(.ob-client,.ob-supervision) .nf-fold>summary{min-height:44px;padding:12px;gap:9px}
#newFirmWorkspace :is(.ob-client,.ob-supervision) .nf-content{padding:14px;gap:14px}
#newFirmWorkspace .ob-office-tools{margin-top:18px;padding-top:14px;border-top:1px solid var(--premium-line)}
#newFirmWorkspace .ob-result{display:flex;gap:8px;flex-wrap:wrap}
#newFirmWorkspace .ob-result label{display:flex;align-items:center;gap:6px;padding:9px;border:1px solid var(--premium-line);border-radius:8px;cursor:pointer}
#newFirmWorkspace .ob-result label:has(:checked){border-color:var(--crm-sign-line);background:var(--crm-sign-bg);color:var(--crm-sign-ink)}
#newFirmWorkspace :is(.ob-client,.ob-supervision) input:is([type=radio],[type=checkbox]){width:17px;height:17px;flex:none}
#newFirmWorkspace .ob-job{border:1px solid var(--crm-task-line);background:var(--crm-task-surface);padding:12px;border-radius:9px;margin:10px 0}
#newFirmWorkspace .ob-late{color:var(--red)!important}
#newFirmWorkspace .ob-job p{margin:8px 0;white-space:pre-wrap}
#newFirmWorkspace .ob-queue{padding:12px;border-top:1px solid var(--premium-line);max-height:48vh;overflow:auto;flex:0 1 auto}
#newFirmWorkspace .ob-calendar{border:1px solid var(--premium-line);border-radius:8px;padding:10px;margin:10px 0}
#newFirmWorkspace .ob-calendar .ws-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;margin-top:8px;text-align:center}
#newFirmWorkspace .ob-calendar button{min-width:0;min-height:27px;padding:3px;background:var(--premium-soft);border:1px solid transparent;border-radius:4px;color:var(--premium-ink);cursor:pointer}
#newFirmWorkspace .ob-calendar .has-events{border-color:var(--crm-task-line);color:var(--crm-task-ink)}
#newFirmWorkspace .ob-calendar .crm-past-date{opacity:.4}
#newFirmWorkspace .ob-queue .nf-client-row{display:block;padding:10px 0}
#newFirmWorkspace .ob-queue .nf-client-row small{margin-top:5px}
#newFirmWorkspace .ob-client .nf-fields{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))}
#newFirmWorkspace :is(.ob-client,.ob-supervision) :is(button,input,textarea,select):focus-visible{outline:2px solid var(--crm-sign-line);outline-offset:3px}
#newFirmWorkspace :is(.ob-client,.ob-supervision) .btn{white-space:normal;line-height:1.4;min-height:36px}
@media(max-width:1100px){#newFirmWorkspace .ob-shared-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){#newFirmWorkspace .ob-hero{flex-direction:column}#newFirmWorkspace .ob-supervision{padding:10px}}

body.new-firm-open #newFirmWorkspace.ob-preview{overflow:auto!important}
#newFirmWorkspace.ob-preview>.nf-page{height:auto;min-height:0;display:block}
#newFirmWorkspace.ob-preview>.ob-client{padding:16px;max-width:1040px;margin:auto}
.ob-transfer .ob-office-tools{margin-top:18px;border-top:1px solid var(--premium-line);padding-top:14px}
.ob-transfer form{margin:12px 0}
.ob-transfer .ob-result{display:flex;flex-wrap:wrap;gap:10px}
.ob-transfer .ob-result label{display:flex;align-items:center;gap:8px}
.ob-transfer input[type=radio]{width:18px;height:18px}

/* Client test role reuses the same case/panel; only staff navigation is hidden. */
body.client-test-role #sidebar .nav,body.client-test-role #sidebar .sidebar-footer,body.client-test-role .top-actions>:not(#crmViewSwitch):not(.phone-theme-switch){display:none!important}
#newFirmWorkspace .nf-client-test-toolbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding-bottom:14px}
#newFirmWorkspace .nf-client-test-toolbar label{display:grid;gap:5px;flex:1;min-width:220px}
#newFirmWorkspace .nf-client-test-toolbar select{width:100%;max-width:500px}

body.client-test-role #globalCrmContacts{display:none!important}

/* panel103: one compact office/client surface and role-specific navigation. */
#clientPortalMessages,#clientPortalTheme{display:none}
body.client-test-role .top-actions>#clientPortalMessages,body.client-test-role .top-actions>#clientPortalTheme{display:inline-flex!important;align-items:center;gap:7px}
body.client-test-role .top-actions>.phone-theme-switch{display:none!important}
body.client-test-role #sidebar{display:none!important}
body.client-test-role .shell{grid-template-columns:minmax(0,1fr)!important}
#newFirmWorkspace .nf-heading{margin-bottom:12px;gap:10px}
#newFirmWorkspace .nf-heading h1{font-size:var(--fs-2xl,22px);--crm-type-heading:var(--fs-2xl,22px)}
#newFirmWorkspace .nf-heading p{display:none}
#newFirmWorkspace .nf-layout{grid-template-columns:260px minmax(0,1fr)}
#newFirmWorkspace .nf-list{overflow:auto;display:block;scrollbar-width:thin}
#newFirmWorkspace .nf-list-items{max-height:32vh;min-height:90px;flex:none}
#newFirmWorkspace .nf-client-row{grid-template-columns:minmax(0,1fr);gap:4px;padding:8px 10px;min-height:0}
#newFirmWorkspace .nf-list-stage{display:flex;align-items:center;justify-content:space-between;gap:5px}
#newFirmWorkspace .nf-list-stage>span{font-size:var(--fs-xs,11.5px);--crm-type-body:var(--fs-xs,11.5px)}
#newFirmWorkspace .nf-list-tools label{font-size:var(--fs-xs,11.5px);--crm-type-body:var(--fs-xs,11.5px)}
#newFirmWorkspace .nf-list-tools :is(input,select){padding:6px 8px;min-height:32px}
#newFirmWorkspace .ob-queue{max-height:none;overflow:visible;padding:10px}
#newFirmWorkspace .ob-queue h3{font-size:var(--fs-md,13.5px);--crm-type-heading:var(--fs-md,13.5px)}
#newFirmWorkspace .ob-calendar{padding:7px}
#newFirmWorkspace .ob-quick-plan{margin:8px;border-radius:7px}
#newFirmWorkspace .ob-quick-plan>summary{padding:9px;min-height:34px}
#newFirmWorkspace .ob-quick-plan .nf-content{padding:9px}
#newFirmWorkspace .ob-quick-plan :is(input,textarea,button){width:100%;min-width:0}
#newFirmWorkspace .ob-hero{padding:12px;align-items:center}
#newFirmWorkspace .ob-hero>div:last-child{text-align:right}
#newFirmWorkspace .ob-progress{gap:5px;padding:10px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(95px,1fr));overflow:visible}
#newFirmWorkspace .ob-progress>button{display:flex;align-items:flex-start;gap:6px;text-align:left;min-width:0;min-height:43px;padding:7px;border:1px solid var(--premium-line);border-radius:7px;background:var(--premium-paper);color:var(--premium-muted);cursor:pointer;white-space:normal}
#newFirmWorkspace .ob-progress>button>span{flex:none;font-weight:var(--fw-b,700)}
#newFirmWorkspace .ob-progress small{margin:0;font-size:var(--fs-xs,11.5px);--crm-type-body:var(--fs-xs,11.5px);line-height:1.35}
#newFirmWorkspace .ob-progress>button:disabled{opacity:.5;cursor:default}
#newFirmWorkspace .ob-progress>button.current{border-color:var(--crm-review-line);background:var(--crm-review-surface);color:var(--crm-review-ink)}
#newFirmWorkspace .ob-progress>button.done{color:var(--green)}
#newFirmWorkspace .ob-now{padding:14px;margin-bottom:10px}
#newFirmWorkspace .ob-instruction{line-height:1.55}
#newFirmWorkspace .ob-supervision{margin:12px 0}
#newFirmWorkspace .ob-supervision>.nf-actions{justify-content:space-between}
#newFirmWorkspace .ob-supervision>.nf-actions label{display:flex;align-items:center;gap:7px}
#newFirmWorkspace .ob-supervision .nf-step-approval{margin-top:14px}
#newFirmWorkspace .ob-help-person{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--premium-line);border-radius:9px}
#newFirmWorkspace .ob-help-person :is(img,.ob-help-avatar){width:44px;height:44px;flex:none;object-fit:cover;border-radius:50%;background:var(--premium-soft)}
#newFirmWorkspace .ob-help-avatar{display:grid;place-items:center;font-size:var(--fs-2xl,22px)}
#newFirmWorkspace .ob-help-person p{margin:5px 0 0}
#newFirmWorkspace .ob-help-person a{color:inherit;font-weight:var(--fw-s,600);text-decoration:underline}
#newFirmWorkspace .nf-person{min-width:0}
#newFirmWorkspace .nf-person .nf-fields{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))}
@media(max-width:850px){#newFirmWorkspace .nf-layout{grid-template-columns:220px minmax(0,1fr)}}
@media(max-width:760px){#newFirmWorkspace .nf-layout{grid-template-columns:minmax(0,1fr)}#newFirmWorkspace .nf-list{max-height:330px}#newFirmWorkspace .ob-progress{grid-template-columns:repeat(3,minmax(0,1fr))}}
html body.client-test-role #crmGlobalToolbar.topbar .top-actions>:not(#crmViewSwitch):not(#clientPortalMessages):not(#clientPortalTheme){display:none!important}
html body.client-test-role #crmGlobalToolbar.topbar .top-actions>#clientPortalMessages,html body.client-test-role #crmGlobalToolbar.topbar .top-actions>#clientPortalTheme{display:inline-flex!important;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:5px 9px;color:var(--premium-muted);background:transparent;border:1px solid var(--premium-line);border-radius:7px}
html body.client-test-role #crmGlobalToolbar.topbar #globalCrmContacts,html body.client-test-role #crmGlobalToolbar.topbar #urgentCrmBell{display:none!important}
#newFirmWorkspace .ob-progress{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:760px){#newFirmWorkspace .ob-progress{grid-template-columns:repeat(3,minmax(0,1fr))}}

html body.client-test-role #crmGlobalToolbar.topbar{position:sticky!important;top:0;z-index:80}

/* Transfer105: only the office transfer checklist and delivery deadline. */
.ob-transfer-compact{margin:10px 0;min-height:0}
.ob-transfer-compact>.nf-fold{margin:0;padding:0;min-height:0}
.ob-transfer-compact>.nf-fold>summary{display:flex;align-items:center;gap:10px;padding:10px 12px;min-height:0}
.ob-transfer-compact>.nf-fold>summary>strong{flex:1;min-width:0;font-size:var(--fs-lg,14px)}
.ob-transfer-compact .ob-transfer-status{margin-left:auto;display:inline-flex;align-items:center;gap:5px;text-align:right;flex:none}
.ob-transfer-compact .crm-exception-lock{background:none!important;border:0!important;box-shadow:none!important;padding:0!important;min-width:20px;min-height:20px;color:inherit;display:inline-flex;align-items:center}
.ob-transfer-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,1fr);gap:14px;padding:0 12px 10px}
.ob-transfer-checks{display:grid;gap:5px;align-content:start}
.ob-transfer-check{display:flex!important;align-items:center;gap:7px;border:1px solid var(--crm-review-line);background:var(--crm-review-surface);border-radius:7px;padding:7px 9px!important;margin:0!important;font-size:var(--fs-md,13.5px)}
.ob-transfer-check input{width:auto!important;margin:0;flex:none}
.ob-transfer-check small{margin-left:auto!important;font-size:var(--fs-xs,11.5px)!important}
.ob-transfer-check.is-received{border-color:color-mix(in srgb,var(--green,#2FBF87) 50%,transparent);background:color-mix(in srgb,var(--green,#2FBF87) 9%,transparent);color:var(--green,#2FBF87)}
.ob-transfer-compact .ob-transfer-deadline{display:grid;align-content:start;gap:6px;min-width:0}
.ob-transfer-compact .ob-transfer-deadline .nf-fold{margin:0;padding:0}
.ob-transfer-compact .ob-transfer-deadline summary{display:flex;flex-wrap:wrap;gap:4px 8px;padding:8px!important;min-height:0;font-size:var(--fs-md,13.5px)}
.ob-transfer-compact form{padding:8px!important;margin:0!important;display:grid;gap:8px}
.ob-transfer-compact form label{font-size:var(--fs-sm,12.5px);display:grid;gap:4px}
.ob-transfer-compact form input{width:100%;min-width:0;box-sizing:border-box}
.ob-transfer-compact form .btn{min-height:32px!important;padding:6px 10px!important}
.ob-transfer-compact p:empty,.ob-transfer-info p:empty{display:none}
.ob-transfer-compact>.nf-fold.ob-transfer-complete{border-color:var(--green,#2FBF87)}
.ob-transfer-info{margin-top:10px;padding:10px 12px!important;min-height:0!important;display:grid;gap:5px}
.ob-transfer-info .handoff-document-header{display:flex;align-items:center;justify-content:space-between;gap:8px}
.ob-transfer-info small{color:var(--muted);font-size:var(--fs-sm,12.5px)}
.ob-transfer-info-check{display:flex;align-items:center;gap:7px;font-size:var(--fs-sm,12.5px)}
@media(max-width:650px){.ob-transfer-grid{grid-template-columns:1fr}.ob-transfer-compact>.nf-fold>summary{flex-wrap:wrap}.ob-transfer-info .handoff-document-header{flex-wrap:wrap}}

html[data-theme=dark] .ob-transfer-compact .ob-transfer-check.is-received{background:#15352b!important;border-color:#2FBF87!important;color:#a5dfbb!important}
html[data-theme=light] .ob-transfer-compact .ob-transfer-check.is-received{background:#e9f6ee!important;border-color:#1F9E6A!important;color:#22633d!important}

/* Formation message pairs follow the shared SMS/e-mail editor. */
.ob-message-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}.ob-message-pair textarea{min-height:180px}.ob-message-pair>*,.ob-message-files{min-width:0}.ob-message-files{border:1px solid var(--line);border-radius:10px;padding:12px;margin:12px 0}.ob-message-files .nf-actions{justify-content:space-between;gap:8px}.ob-message-files label{overflow-wrap:anywhere}.ob-message-files small{display:block;overflow-wrap:anywhere}@media(max-width:700px){.ob-message-pair{grid-template-columns:1fr}}

/* FINALE132: keep the office list and its calendar in the same layout as sales. */
#newFirmWorkspace .nf-list{display:flex;flex-direction:column;overflow:hidden}
#newFirmWorkspace .nf-list-items{flex:1;min-height:90px;max-height:none;overflow:auto}
#newFirmWorkspace .ob-queue{padding:0;display:flex;flex-direction:column;flex:none;min-height:0;margin-top:auto}
#newFirmWorkspace [data-ob-queue]{max-height:25vh;overflow:auto;padding:0 10px}
#newFirmWorkspace .queue-calendar{flex:none;margin:0;border-radius:0}
#newFirmWorkspace .nf-detail>.ob-client{padding:0;max-width:none;margin:0}
@media(max-width:760px){#newFirmWorkspace .nf-list{max-height:420px}}
/* CLIENT155 — client sections, shared colors and one confirmation per section. */
html:root #newFirmWorkspace .ob-client [data-client-sections]{display:flex;flex-direction:column;gap:12px;margin:0 0 12px}
html:root #newFirmWorkspace .ob-client [data-people]{display:flex;flex-direction:column;gap:12px}
html:root #newFirmWorkspace .ob-client .nf-fold{margin:0 0 12px!important}
html:root #newFirmWorkspace .ob-client [data-client-sections] .nf-fold{margin:0!important}
html:root #newFirmWorkspace .ob-client .nf-fold>summary{display:flex!important;align-items:center;gap:12px;min-height:46px;padding:12px;cursor:pointer}
html:root #newFirmWorkspace .ob-client .nf-fold>summary strong{min-width:0;flex:1;font-size:var(--fs-lg,14px)!important;line-height:1.4}
html:root #newFirmWorkspace .ob-client .nf-fold>summary>.nf-section-status{margin-left:auto;flex:none;font-size:var(--fs-xs,11.5px)!important;line-height:1.4;padding:4px 8px;border:1px solid var(--crm-review-line,#E5A83D);border-radius:5px;color:var(--premium-ink,var(--text));white-space:nowrap}
html:root #newFirmWorkspace .ob-client .nf-section-pending{border:1px solid var(--crm-review-line,#E5A83D)!important;background:var(--premium-paper,var(--surface))!important}
html:root #newFirmWorkspace .ob-client .nf-section-done{border:1px solid #426f5b!important;background:var(--premium-paper,var(--surface))!important}
html:root #newFirmWorkspace .ob-client .nf-section-done>summary{background:color-mix(in srgb,#315c49 30%,var(--premium-paper,var(--surface)))!important;color:var(--premium-ink,var(--text))!important}
html:root #newFirmWorkspace .ob-client .nf-section-done>summary>.nf-section-status{border-color:#426f5b;color:inherit;background:transparent}
html:root #newFirmWorkspace .ob-client .nf-section-actions{display:flex;align-items:center;gap:12px;justify-content:flex-end;border-top:1px solid var(--border);padding-top:14px;margin-top:12px}
html:root #newFirmWorkspace .ob-client .nf-section-actions .document-signature-submit{width:auto!important;flex:1;max-width:520px;white-space:normal}
html:root #newFirmWorkspace .ob-client .nf-section-draft{flex:none;background:transparent!important;color:var(--muted)!important;border:1px solid var(--border)!important;box-shadow:none!important;font-size:var(--fs-sm,12.5px)!important}
html:root #newFirmWorkspace .ob-client .nf-person{border:0;margin:0;padding:0;min-width:0}
html:root #newFirmWorkspace .ob-client .nf-section-add{align-self:flex-start;background:transparent!important;color:var(--premium-ink,var(--text))!important;border:1px solid var(--border)!important}
@media(max-width:600px){html:root #newFirmWorkspace .ob-client .nf-section-actions{flex-wrap:wrap}html:root #newFirmWorkspace .ob-client .nf-section-actions .document-signature-submit{flex-basis:100%;order:-1}html:root #newFirmWorkspace .ob-client .nf-fold>summary{gap:7px;padding:10px}}

html:root #newFirmWorkspace .ob-client details.ob-now{padding:0!important}
