/* Role colors: identity_store.ROLES → data-primary-role → shared profile circle. */
.staff-profile-circle[data-primary-role=executive]{--profile-fg:#14532D;--profile-line:#14532D;--profile-bg:#EDF7EF}
.staff-profile-circle[data-primary-role=management]{--profile-fg:#1D4ED8;--profile-line:#1D4ED8;--profile-bg:#EFF6FF}
.staff-profile-circle[data-primary-role=sales]{--profile-fg:#6D28D9;--profile-line:#6D28D9;--profile-bg:#F3EEFF}
.staff-profile-circle[data-primary-role=engineering]{--profile-fg:#0F766E;--profile-line:#0F766E;--profile-bg:#F0FDFA}
.staff-profile-circle[data-primary-role=support]{--profile-fg:#9A3412;--profile-line:#9A3412;--profile-bg:#FFF7ED}
.staff-profile-circle[data-primary-role=admin]{--profile-fg:#475569;--profile-line:#475569;--profile-bg:#F1F5F9}
.staff-profile-circle[data-primary-role=production]{--profile-fg:#475F7D;--profile-line:#475F7D;--profile-bg:#EDF2F8}
.staff-profile-circle[data-primary-role]{border-color:var(--profile-fg);background:var(--profile-bg);color:var(--profile-fg);box-shadow:none;font-weight:400}
.staff-profile-circle .staff-profile-unit{font-weight:400}.staff-profile-circle .staff-profile-name{font-weight:600;font-size:14px;max-height:37px;line-height:1.25}.staff-profile-large .staff-profile-unit{font-size:16px;font-weight:400}.staff-profile-large .staff-profile-name{font-size:23px;max-height:60px}.staff-profile-large{border-width:1px}
.staff-operations{padding:24px;margin-top:var(--gap)}.staff-operation-primary{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px;background:linear-gradient(100deg,#f7f3ff,#f1ebff);border-radius:14px}.staff-operation-primary h3{font-size:20px;margin:0;font-weight:600}.staff-operation-primary p{font-size:15px}.staff-operation-primary>div:last-child{display:flex;gap:12px}.staff-operation-primary button{min-width:120px;font-weight:400}.staff-future{margin:12px 0}.staff-future>div{display:grid;grid-template-columns:230px 1fr;padding:12px 16px;border-bottom:1px solid var(--line)}.staff-future dt{font-weight:400}.staff-future dd{color:var(--muted);margin:0;font-size:14px}
.staff-home-profile{display:flex;gap:22px;align-items:center;margin-top:20px}.staff-home-profile .staff-profile-large{width:132px;height:132px;min-height:132px;flex:0 0 132px;padding:16px 10px}.staff-home-profile .staff-profile-large .staff-profile-unit{font-size:14px}.staff-home-profile .staff-profile-large .staff-profile-name{font-size:20px}.staff-home-profile p{font-size:14px;line-height:1.6}.staff-home-profile strong{font-weight:600}.staff-home-profile .staff-profile-large .staff-profile-name{overflow-wrap:anywhere}.staff-account-summary{font-size:14px;color:var(--muted)}.home-grid>.staff-employee-card{padding:24px}.staff-employee-card h2{font-size:21px}.staff-employee-card .employee-foot{margin-top:15px}.staff-employee-card .staff-home-profile{flex-wrap:wrap;justify-content:center}.staff-employee-card .staff-home-profile>div{flex:1;min-width:120px}
.staff-form{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:18px;font-weight:400}.staff-section{border:1px solid #e0d9ef;border-radius:16px;padding:20px;min-width:0}.staff-section h3{font-size:20px;font-weight:600;margin:0 0 18px}.staff-field{display:grid;gap:7px;font-size:15px;margin:12px 0}.staff-field input,.staff-field select{width:100%;min-width:0;min-height:44px}.staff-full{grid-column:1/-1}.staff-phone-kind{border:0;padding:4px 0;display:flex;gap:20px}.staff-phone-kind legend{font-size:15px;margin-bottom:5px}.staff-phone-kind label{display:flex;align-items:center;gap:8px}.staff-phone-kind input,.staff-roles input{width:18px;min-height:18px;accent-color:var(--primary)}.staff-roles{border:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.staff-roles label{display:flex;align-items:center;gap:8px;min-height:44px;border:1px solid var(--line);padding:8px;border-radius:9px;font-size:15px}.staff-profile-preview{display:flex;flex-direction:column;align-items:center;padding:20px 0 5px;gap:12px}.staff-password{display:flex;gap:8px}.staff-password input{min-width:0}.staff-password button{min-width:58px}.staff-list-heading{display:flex;align-items:end;gap:16px;justify-content:space-between;margin-bottom:18px}.staff-list-heading>label{display:grid;gap:6px;flex:1;max-width:540px}.staff-search{display:flex;gap:6px}.staff-search input{width:100%;min-width:0}.staff-search button{min-width:44px}.staff-list{display:grid;gap:10px;margin-top:18px}.staff-list-person{display:grid;grid-template-columns:1fr 1.2fr 1.5fr 1fr;gap:14px;text-align:left;align-items:center;padding:16px;line-height:1.6;font-size:14px}.staff-list-identity{display:grid}.staff-list-person small{display:block;color:var(--muted)}.staff-list-person strong{font-size:16px;font-weight:600}.staff-detail{display:grid;grid-template-columns:1fr 1.4fr;gap:24px}.staff-detail>section:first-child{display:flex;align-items:center;flex-direction:column;text-align:center;gap:8px}.staff-detail h3{font-weight:600;font-size:21px;margin:10px 0}.staff-detail p{font-size:15px}.staff-detail-actions{display:grid;gap:12px;margin:22px 0}.staff-change-form{display:grid;gap:14px}.staff-change-form label{display:grid;gap:5px}.staff-change-form button{min-height:44px}.staff-change-form .password-row label{display:flex}.staff-change-form input{min-width:0;width:100%}.staff-change-form .visibility input{width:18px}.staff-home-project-list{padding:20px}.staff-home-project-list a{color:var(--primary)}.staff-home-project-list li{padding:10px 0;border-bottom:1px solid var(--line)}
@media(max-width:720px){.staff-form,.staff-detail{grid-template-columns:minmax(0,1fr)}.staff-full{grid-column:auto}.staff-section{padding:16px}.staff-operations{padding:20px 16px}.staff-operation-primary{flex-direction:column;align-items:stretch;padding:16px}.staff-operation-primary>div:last-child{flex-wrap:wrap}.staff-operation-primary button{flex:1;min-width:100px}.staff-future>div{grid-template-columns:1fr;gap:4px;padding:12px 0}.staff-list-person{grid-template-columns:minmax(0,1fr);gap:5px}.staff-list-heading{flex-wrap:wrap}.staff-list-heading>label{flex-basis:100%}.staff-list-heading>button{width:100%}.staff-home-profile{gap:15px}.staff-roles{gap:8px}.staff-detail>section{min-width:0}.staff-detail p{overflow-wrap:anywhere}.staff-form .project-dialog-actions{position:sticky;bottom:-20px;background:var(--surface);padding:14px 0 calc(10px + env(safe-area-inset-bottom));z-index:1}}

.staff-home-grid{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1.05fr)}
@container(max-width:1000px){.staff-home-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container(max-width:650px){.staff-home-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:720px){.staff-home-grid{grid-template-columns:minmax(0,1fr)}}

.staff-home-grid>.panel{min-height:0}.staff-schedule-summary .schedule-type{margin-top:22px;color:var(--muted);font-size:15px}.staff-schedule-summary .inbox-empty{padding:28px 0}.project-person-label{max-width:100%;overflow:hidden;text-overflow:ellipsis}

.staff-home-project-list,#design-home-inbox{margin-top:var(--gap)}

/* Current staff list: one primary-role group, shared profile at the left. */
.staff-list-group{min-width:0}.staff-list-group+.staff-list-group{border-top:1px solid var(--line);margin-top:10px;padding-top:8px}.staff-list-group>h3{font-size:13px;font-weight:400;color:var(--muted);margin:4px 0 8px;padding:0 4px}.staff-list-row{display:grid;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:12px;padding:8px 0}.staff-list-profile{display:flex;justify-content:center;min-width:0}.staff-list-profile .staff-profile-circle{width:84px;height:84px;min-width:84px;min-height:84px}.staff-list-profile .staff-profile-unit{font-size:11px}.staff-list-profile .staff-profile-name{font-size:15px}.staff-list-person{min-width:0;width:100%;overflow-wrap:anywhere}.staff-list-person>span{min-width:0}.staff-list-phone{font-variant-numeric:tabular-nums}.staff-list-row:focus-within{border-radius:10px;background:var(--surface-soft,#faf9ff)}
@media(max-width:720px){.staff-list-row{grid-template-columns:80px minmax(0,1fr);gap:8px;align-items:start}.staff-list-profile{padding-top:10px}.staff-list-profile .staff-profile-circle{width:76px;height:76px;min-width:76px;min-height:76px}.staff-list-profile .staff-profile-name{font-size:14px}.staff-list-profile .staff-profile-unit{font-size:10px}.staff-list-person{padding:10px;line-height:1.55;font-size:13px}.staff-list-person strong{font-size:15px}.staff-list-group+.staff-list-group{margin-top:6px;padding-top:6px}}

/* Server palette IDs are shared display tokens. Legacy color/role selectors stay intact. */
:is(.staff-profile-circle,.staff-color-dot)[data-profile-palette=green]{--profile-fg:#14532D;--profile-bg:#EDF7EF}
:is(.staff-profile-circle,.staff-color-dot)[data-profile-palette=slate]{--profile-fg:#475569;--profile-bg:#F1F5F9}
:is(.staff-profile-circle,.staff-color-dot)[data-profile-palette=blue]{--profile-fg:#1D4ED8;--profile-bg:#EFF6FF}
:is(.staff-profile-circle,.staff-color-dot)[data-profile-palette=purple]{--profile-fg:#6D28D9;--profile-bg:#F3EEFF}
:is(.staff-profile-circle,.staff-color-dot)[data-profile-palette=teal]{--profile-fg:#0F766E;--profile-bg:#F0FDFA}
:is(.staff-profile-circle,.staff-color-dot)[data-profile-palette=orange]{--profile-fg:#9A3412;--profile-bg:#FFF7ED}
:is(.staff-profile-circle,.staff-color-dot)[data-profile-palette=steel]{--profile-fg:#475F7D;--profile-bg:#EDF2F8}
.staff-profile-circle[data-profile-palette]{border-color:var(--profile-fg);background:var(--profile-bg);color:var(--profile-fg)}
.staff-color-dot{display:block;width:23px;height:23px;border:1px solid var(--profile-fg);background:var(--profile-bg);color:var(--profile-fg);border-radius:50%}
.staff-enrollment-dialog .project-dialog-body{padding-bottom:0}.staff-enrollment{font-size:16px;font-weight:400;min-width:0}.staff-enrollment [hidden]{display:none!important}
.staff-enrollment-steps{display:flex;gap:24px;border-bottom:1px solid var(--line);margin-bottom:0;flex-wrap:wrap}.staff-enrollment-steps button{display:flex;align-items:center;gap:8px;min-height:50px;padding:9px 0;border:0;border-radius:0;background:none;color:var(--muted);font-weight:400;position:relative}.staff-enrollment-steps button span{width:23px;height:23px;display:grid;place-items:center;border-radius:50%;background:var(--bg);font-size:13px}.staff-enrollment-steps [aria-current=step]{color:var(--primary);font-weight:500}.staff-enrollment-steps [aria-current=step]:after{content:'';position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--primary)}.staff-enrollment-steps [aria-current=step] span{background:#f2edff}
.staff-enrollment-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;min-width:0}.staff-enrollment-main{padding:26px 26px 28px 0;min-width:0}.staff-enrollment h3{font-size:21px;font-weight:600;margin:0 0 8px}.staff-enrollment h4{font-size:16px;font-weight:500;margin:0 0 12px}.staff-enrollment-help{font-size:14px;color:var(--muted);line-height:1.65;margin:0 0 22px}.staff-enrollment-note{font-size:13px;color:var(--muted);line-height:1.65;margin:8px 0;overflow-wrap:anywhere}.staff-enrollment-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 18px}.staff-enrollment .staff-field{font-size:15px;margin:10px 0}.staff-enrollment input:not([type=radio]):not([type=checkbox]),.staff-enrollment select{font-size:16px;font-weight:400;min-height:44px}.staff-enrollment input[aria-invalid=true],.staff-enrollment select[aria-invalid=true]{border-color:#9f2737;outline-color:#9f2737}.staff-enrollment .staff-phone-kind{flex-wrap:wrap;gap:12px;font-size:15px;align-content:start;margin:10px 0}.staff-enrollment .staff-phone-kind legend{font-size:15px;margin-bottom:13px}.staff-enrollment input[type=radio],.staff-enrollment input[type=checkbox]{width:18px;height:18px;min-height:18px;accent-color:var(--primary);flex:none;margin:2px 0}.staff-enrollment input:disabled{cursor:default}
.staff-enrollment-color,.staff-enrollment-group{border-top:1px solid var(--line);padding-top:20px;margin-top:22px}.staff-enrollment-color-modes{border:0;margin:0 0 14px;padding:0;display:flex;gap:16px;flex-wrap:wrap}.staff-enrollment-color-modes label{display:flex;align-items:center;gap:7px;font-size:14px;min-height:32px}.staff-enrollment-swatches{display:flex;gap:7px;flex-wrap:wrap}.staff-enrollment-swatches button{min-width:54px;min-height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:8px;font-size:13px;font-weight:400}.staff-enrollment-swatches [aria-pressed=true]{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary);background:#f7f4ff}.staff-enrollment-swatches [aria-pressed=true] .staff-color-dot:after{content:'✓';display:grid;place-items:center;font-size:13px;line-height:21px}
.staff-enrollment-template{display:flex;align-items:end;gap:10px}.staff-enrollment-template .staff-field{flex:1;margin:0}.staff-enrollment-template button{white-space:nowrap;min-height:44px;font-size:14px;font-weight:400}.staff-enrollment-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.staff-enrollment-choice{display:flex;align-items:flex-start;gap:9px;border:1px solid var(--line);border-radius:10px;padding:13px;cursor:pointer;min-width:0;min-height:70px}.staff-enrollment-choice:has(input:checked){border-color:var(--primary);background:#f7f4ff}.staff-enrollment-choice:has(input:disabled){cursor:default}.staff-enrollment-choice span{display:grid;gap:4px;min-width:0}.staff-enrollment-choice strong{font-size:14px;font-weight:500;overflow-wrap:anywhere}.staff-enrollment-choice small{font-size:12px;color:var(--muted);line-height:1.6;overflow-wrap:anywhere}.staff-enrollment details>summary{font-size:15px;font-weight:500;cursor:pointer;min-height:36px}.staff-enrollment-preview{border-left:1px solid var(--line);background:var(--surface-soft,#faf9fe);padding:25px 20px;min-width:0}.staff-enrollment-preview-title{font-size:14px;color:var(--muted);margin:0 0 22px}.staff-enrollment-preview .staff-profile-circle{width:100px;height:100px;min-width:100px;padding:12px;box-sizing:border-box}.staff-enrollment-preview .staff-profile-unit{font-size:11px;font-weight:400}.staff-enrollment-preview .staff-profile-name{font-size:16px;font-weight:600}.staff-enrollment-preview h4{font-size:14px}.staff-enrollment-preview ul{list-style:none;padding:0;margin:0;display:grid;gap:7px;font-size:14px;line-height:1.55;overflow-wrap:anywhere}.staff-enrollment-preview li:before{content:'·';margin-right:8px;color:var(--muted)}.staff-enrollment-preview [data-enrollment-retry]{font-size:14px;font-weight:400}
.staff-enrollment-confirm{display:grid;grid-template-columns:116px minmax(0,1fr);gap:16px 14px;font-size:15px;line-height:1.65;margin:24px 0}.staff-enrollment-confirm dt{color:var(--muted)}.staff-enrollment-confirm dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}.staff-enrollment-footer{position:sticky;bottom:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:18px 0 calc(18px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--surface);margin-top:0}.staff-enrollment-footer>div{display:flex;gap:9px;flex-wrap:wrap}.staff-enrollment-footer button{min-height:44px;font-size:14px;font-weight:400}.staff-enrollment button:focus-visible,.staff-enrollment input:focus-visible,.staff-enrollment select:focus-visible,.staff-enrollment summary:focus-visible{outline:3px solid var(--primary);outline-offset:3px}.staff-enrollment button:hover:not(:disabled){background:#f3efff}.staff-enrollment button.primary:hover:not(:disabled){background:var(--primary)}.staff-enrollment button:disabled{cursor:default}
.staff-enrollment-preview .staff-profile-unit,.staff-enrollment-preview .staff-profile-name{display:block;max-height:none;overflow:visible;white-space:normal;overflow-wrap:anywhere;-webkit-line-clamp:unset}.staff-enrollment-preview [data-name-size=medium] .staff-profile-circle{width:144px;height:144px;min-width:0;max-width:100%}.staff-enrollment-preview [data-name-size=long] .staff-profile-circle{width:220px;height:220px;min-width:0;max-width:100%;padding:14px}.staff-enrollment-preview [data-name-size=long] .staff-profile-name{font-size:14px}.staff-detail-permissions{display:grid;grid-template-columns:90px minmax(0,1fr);gap:10px;font-size:14px;text-align:left;line-height:1.6;margin:16px 0}.staff-detail-permissions dt{color:var(--muted)}.staff-detail-permissions dd{margin:0;overflow-wrap:anywhere}
@media(max-width:900px){.staff-enrollment-layout{grid-template-columns:minmax(0,1fr) 220px}.staff-enrollment-main{padding-right:20px}.staff-enrollment-choices{grid-template-columns:minmax(0,1fr)}.staff-enrollment-template{flex-direction:column;align-items:stretch}.staff-enrollment-preview{padding:23px 16px}}
@media(max-width:720px){.staff-enrollment-layout{grid-template-columns:minmax(0,1fr)}.staff-enrollment-main{padding:22px 0}.staff-enrollment-preview{border-left:0;border-top:1px solid var(--line);padding:22px 16px}.staff-enrollment-fields{grid-template-columns:minmax(0,1fr)}.staff-enrollment .staff-full{grid-column:auto}.staff-enrollment-steps{gap:12px;justify-content:space-between}.staff-enrollment-steps button{font-size:13px;gap:4px;min-height:50px}.staff-enrollment-steps button span{width:20px;height:20px;font-size:12px}.staff-enrollment-confirm{grid-template-columns:90px minmax(0,1fr);gap:14px 10px;font-size:14px}.staff-enrollment-footer{bottom:-1px;padding:14px 0 calc(14px + env(safe-area-inset-bottom));gap:8px}.staff-enrollment-footer>div{gap:6px;flex-wrap:nowrap;width:100%}.staff-enrollment-footer button{font-size:14px;padding:10px 12px}.staff-enrollment-footer .primary{margin-left:auto}.staff-enrollment-swatches button{min-width:54px}.staff-enrollment-preview-title{margin-bottom:16px}}

/* Keep the literal test marker separate from the complete adjacent name. */
.staff-profile-name>.staff-profile-marker{display:block;font:inherit;line-height:inherit}
