/* TeamAct CRM — Custom Field Access Control V13.3
   White/neutral structural UI. No teal/blue cards. Purple is reserved for a true primary action. */
:root{--cfac-text:#172033;--cfac-muted:#667085;--cfac-border:#e1e5ec;--cfac-soft:#f7f8fa;--cfac-purple:#5b43d6;--cfac-purple-soft:#f4f1ff;--cfac-red:#b42318;--cfac-green:#067647}
body.cfac-open{overflow:hidden!important}
.cfac-overlay{position:fixed;inset:0;z-index:99980;background:rgba(15,23,42,.48);display:grid;place-items:center;padding:18px}
.cfac-dialog{width:min(1220px,96vw);height:min(790px,92vh);background:#fff;border:1px solid var(--cfac-border);border-radius:12px;box-shadow:0 24px 70px rgba(15,23,42,.20);display:grid;grid-template-rows:auto auto auto 1fr auto;overflow:hidden;color:var(--cfac-text)}
.cfac-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px 18px 13px;border-bottom:1px solid var(--cfac-border);background:#fff}.cfac-head h2{margin:0 0 4px;font-size:18px}.cfac-head p{margin:0;color:var(--cfac-muted);font-size:12px}.cfac-head-actions{display:flex;align-items:center;gap:10px}.cfac-close,.cfac-neutral-link{display:inline-grid;place-items:center;min-height:32px;padding:0 10px;border:1px solid var(--cfac-border);border-radius:7px;background:#fff;color:#475467;cursor:pointer;font-size:12px}.cfac-close{width:32px;padding:0;font-size:18px}.cfac-close:hover,.cfac-neutral-link:hover{background:var(--cfac-soft)}
.cfac-priority{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 18px;border-bottom:1px solid var(--cfac-border);background:#fff;font-size:11px;color:#667085}.cfac-priority b{color:#344054;margin-right:4px}.cfac-priority span{padding:3px 7px;border:1px solid #e5e7eb;border-radius:999px;background:#fff}.cfac-priority i{font-style:normal;color:#98a2b3}
.cfac-tabs{display:flex;gap:18px;padding:0 18px;border-bottom:1px solid var(--cfac-border);background:#fff}.cfac-tabs [role=tab]{padding:11px 1px 9px;border-bottom:2px solid transparent;color:#475467;font-size:12px;font-weight:600;cursor:pointer}.cfac-tabs [role=tab].active{color:#4f37c7;border-color:#5b43d6}
.cfac-body{min-height:0;overflow:auto;padding:14px 18px;background:#fff}.cfac-two{display:grid;grid-template-columns:1fr 1fr;gap:14px;height:100%}.cfac-two>section,.cfac-user-mode{border:1px solid var(--cfac-border);border-radius:9px;background:#fff;min-height:0;overflow:hidden}.cfac-section-head{display:flex;align-items:end;justify-content:space-between;gap:10px;padding:12px;border-bottom:1px solid var(--cfac-border);background:#fff}.cfac-section-head h3{margin:0 0 2px;font-size:13px}.cfac-section-head p{margin:0;color:var(--cfac-muted);font-size:11px}.cfac-section-head input{width:190px;height:32px;border:1px solid #d7dce4;border-radius:6px;background:#fff;padding:0 9px;font-size:12px}.cfac-list{max-height:420px;overflow:auto;padding:6px}.cfac-check-row,.cfac-user-field{display:flex;align-items:flex-start;gap:9px;padding:9px 8px;border-bottom:1px solid #eef0f3;background:#fff;cursor:pointer}.cfac-check-row:last-child,.cfac-user-field:last-child{border-bottom:0}.cfac-check-row:hover,.cfac-user-field:hover{background:#fafafa}.cfac-check-row input,.cfac-user-field input{margin-top:3px}.cfac-check-row span,.cfac-user-field span{display:grid;gap:2px}.cfac-check-row b,.cfac-user-field b{font-size:12px;color:#202939}.cfac-check-row small,.cfac-user-field small{font-size:10px;color:#667085}
.cfac-user-select{display:flex;align-items:end;justify-content:space-between;gap:16px;padding:12px;border-bottom:1px solid var(--cfac-border)}.cfac-user-select label{display:grid;gap:5px;font-size:11px;color:#475467}.cfac-user-select select{min-width:280px;height:34px;border:1px solid #d7dce4;border-radius:6px;background:#fff;padding:0 9px}.cfac-user-select p{margin:0;color:#667085;font-size:11px}.cfac-user-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;max-height:460px;overflow:auto;padding:6px}.cfac-user-field{border-right:1px solid #eef0f3}
.cfac-matrix-note{display:flex;justify-content:space-between;gap:12px;padding:0 0 10px;font-size:11px;color:#667085}.cfac-matrix-note b{color:#344054}.cfac-matrix-wrap{overflow:auto;border:1px solid var(--cfac-border);border-radius:8px}.cfac-matrix{border-collapse:separate;border-spacing:0;min-width:100%;background:#fff;font-size:11px}.cfac-matrix th,.cfac-matrix td{padding:7px 8px;border-right:1px solid #eceff3;border-bottom:1px solid #eceff3;min-width:112px;vertical-align:top;background:#fff}.cfac-matrix thead th{position:sticky;top:0;z-index:2;background:#f7f8fa;color:#344054}.cfac-matrix tbody th{position:sticky;left:0;z-index:1;min-width:170px;text-align:left}.cfac-matrix tbody th b,.cfac-matrix tbody th small{display:block}.cfac-matrix tbody th small{font-weight:400;color:#667085;margin-top:2px}.cfac-cell{display:grid;gap:2px;padding:5px 6px;border:1px solid #e6e8ed;border-radius:6px;background:#fff;cursor:pointer}.cfac-cell b{font-size:10px}.cfac-cell small{font-size:9px;color:#667085}.cfac-cell.level-edit{border-color:#d8d0ff;background:#fbfaff}.cfac-cell.level-deny b{color:#7a271a}.cfac-cell.level-view b{color:#344054}.cfac-cell.level-edit b{color:#4f37c7}
.cfac-foot{display:flex;align-items:end;justify-content:space-between;gap:14px;padding:12px 18px;border-top:1px solid var(--cfac-border);background:#fff}.cfac-rule-controls{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.cfac-rule-controls label{display:grid;gap:4px;font-size:10px;color:#667085}.cfac-rule-controls select,.cfac-rule-controls input{height:33px;border:1px solid #d7dce4;border-radius:6px;background:#fff;color:#202939;padding:0 8px;font-size:11px;min-width:110px}.cfac-rule-controls label:first-child select{min-width:205px}.cfac-foot-actions{display:flex;gap:8px;align-items:center}.cfac-neutral,.cfac-primary{display:inline-grid;place-items:center;min-height:35px;border-radius:7px;padding:0 14px;cursor:pointer;font-size:12px;font-weight:600}.cfac-neutral{background:#fff;border:1px solid #d7dce4;color:#344054}.cfac-neutral:hover{background:#f8f9fb}.cfac-primary{background:var(--cfac-purple)!important;background-image:none!important;border:1px solid var(--cfac-purple)!important;color:#fff!important;box-shadow:none!important}.cfac-primary:hover{background:#4f37c7!important}
.cfac-empty{padding:20px;text-align:center;color:#667085;font-size:12px}.cfac-history{display:grid;gap:8px}.cfac-history>div{display:grid;gap:2px;padding:9px 0;border-bottom:1px solid #eceff3}.cfac-history b{font-size:12px}.cfac-history span,.cfac-history small{font-size:10px;color:#667085}
.member-cf-row{position:relative}.member-cf-edit{margin-left:auto;font-size:10px!important;font-weight:600;color:#5138c9!important;cursor:pointer;padding-left:8px;background:transparent!important}.member-cf-edit:hover{text-decoration:underline}
/* Action dropdown V13.3: div items, explicit neutral lock so legacy global button/card rules cannot recolor them. */
html body #customFieldsCenterV132 .cfm-action details>div .cfm-pop-item{display:block!important;width:100%!important;box-sizing:border-box!important;padding:8px 10px!important;border:0!important;border-radius:5px!important;background:#fff!important;background-image:none!important;color:#334155!important;text-align:left!important;font-size:12px!important;font-weight:500!important;line-height:1.3!important;box-shadow:none!important;text-shadow:none!important;cursor:pointer!important;user-select:none!important}
html body #customFieldsCenterV132 .cfm-action details>div .cfm-pop-item:hover,html body #customFieldsCenterV132 .cfm-action details>div .cfm-pop-item:focus-visible{background:#f6f7f9!important;color:#172033!important;outline:none!important}.cfm-pop-item.cfm-menu-danger{color:#b42318!important}.cfm-pop-item.cfm-menu-activate{color:#067647!important}
@media(max-width:900px){.cfac-dialog{height:95vh}.cfac-two{grid-template-columns:1fr}.cfac-user-field-grid{grid-template-columns:1fr}.cfac-foot{align-items:stretch;flex-direction:column}.cfac-foot-actions{justify-content:flex-end}.cfac-section-head{align-items:stretch;flex-direction:column}.cfac-section-head input{width:100%}}

/* V13.4.4 exact-access control: neutral/white, no structural blue/teal cards. */
.cfac-exact-set{display:flex;align-items:flex-start;gap:7px;max-width:265px;padding:7px 9px;border:1px solid #e3e6ec;border-radius:7px;background:#fff;color:#344054;font-size:10px;line-height:1.35;cursor:pointer}
.cfac-exact-set input{margin-top:2px;accent-color:#6d4aff}
.cfac-exact-set span{display:grid;gap:1px}.cfac-exact-set b{font-size:11px;color:#202939}.cfac-exact-set small{font-size:9px;color:#667085;font-weight:400}
@media(max-width:1100px){.cfac-exact-set{max-width:none}.cfac-foot{align-items:stretch;flex-wrap:wrap}}
