/* TeamAct CRM — Custom Fields Management Center V13.2
   White/neutral canvas. No blue or teal structural cards. */

.custom-fields-center-v13-2{
  --cf-purple:#5b4fd6;
  --cf-purple-soft:#f6f4ff;
  --cf-text:#172033;
  --cf-muted:#667085;
  --cf-border:#e3e7ee;
  --cf-border-strong:#d5dbe5;
  --cf-soft:#f8fafc;
  --cf-green:#15803d;
  --cf-green-soft:#f0fdf4;
  --cf-amber:#b45309;
  --cf-red:#c2414a;
  color:var(--cf-text);
  display:grid;
  gap:12px;
}
.custom-fields-center-v13-2 *{box-sizing:border-box}
.custom-fields-center-v13-2 button,
.custom-fields-center-v13-2 select,
.custom-fields-center-v13-2 input{font:inherit}

.cfm-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  padding:0 0 12px;border-bottom:1px solid var(--cf-border);background:transparent!important;
}
.cfm-head h1{margin:0 0 4px;font-size:18px;line-height:1.3;font-weight:650;color:var(--cf-text)}
.cfm-head p{margin:0;color:var(--cf-muted);font-size:13px;line-height:1.45}
.cfm-head>div:last-child{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
.cfm-tenant{display:grid;gap:4px;font-size:12px;color:var(--cf-muted)}
.cfm-tenant select{height:36px;min-width:220px;border:1px solid var(--cf-border-strong);border-radius:7px;background:#fff;color:var(--cf-text);padding:0 10px}
.cfm-primary{
  min-height:36px;border:1px solid var(--cf-purple)!important;border-radius:7px!important;
  background:var(--cf-purple)!important;color:#fff!important;padding:0 13px!important;font-weight:600!important;box-shadow:none!important;
}
.cfm-primary:hover{background:#4f43c6!important}
.cfm-primary:disabled{opacity:.45;cursor:not-allowed}
.cfm-secondary{min-height:36px;border:1px solid var(--cf-border-strong)!important;border-radius:7px!important;background:#fff!important;color:#334155!important;padding:0 12px!important;box-shadow:none!important}
.cfm-secondary:hover{background:var(--cf-soft)!important}

.cfm-summary{
  display:grid;grid-template-columns:repeat(8,minmax(82px,1fr));
  background:#fff!important;border:1px solid var(--cf-border)!important;border-radius:9px;overflow:hidden;
}
.cfm-summary span{min-height:54px;padding:9px 11px;border-right:1px solid var(--cf-border);display:flex;flex-direction:column;justify-content:center;color:var(--cf-muted);font-size:11px;background:#fff!important}
.cfm-summary span:last-child{border-right:0}
.cfm-summary b{font-size:16px;line-height:1.2;color:var(--cf-text);font-weight:650;margin-bottom:2px}

.cfm-toolbar{
  display:grid;grid-template-columns:minmax(260px,1.7fr) repeat(5,minmax(120px,.72fr)) auto;
  gap:8px;align-items:center;background:#fff!important;border:1px solid var(--cf-border)!important;border-radius:9px;padding:9px;
}
.cfm-toolbar select,.cfm-search{height:36px;border:1px solid var(--cf-border-strong)!important;border-radius:7px;background:#fff!important;color:#334155!important}
.cfm-toolbar select{padding:0 9px;min-width:0}
.cfm-search{display:flex;align-items:center;gap:7px;padding:0 10px}
.cfm-search svg{width:16px;height:16px;color:#94a3b8;flex:0 0 auto}
.cfm-search input{border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;width:100%;min-width:0;color:#334155!important}

.cfm-bulk{
  min-height:42px;display:flex;align-items:center;gap:7px;flex-wrap:wrap;background:#fff!important;border:1px solid var(--cf-border)!important;border-radius:9px;padding:7px 10px;
}
.cfm-bulk.is-hidden{display:none}
.cfm-bulk span{margin-right:auto;color:var(--cf-muted);font-size:12px}
.cfm-bulk button{height:30px;border:1px solid var(--cf-border-strong)!important;background:#fff!important;color:#334155!important;border-radius:6px!important;padding:0 9px!important;box-shadow:none!important;font-size:12px!important}
.cfm-bulk button:hover{background:var(--cf-soft)!important;border-color:#c7ccd6!important}

.cfm-table-wrap{background:#fff!important;border:1px solid var(--cf-border)!important;border-radius:9px;overflow:auto}
.cfm-table{width:100%;border-collapse:separate;border-spacing:0;min-width:1050px;background:#fff!important}
.cfm-table thead th{height:39px;padding:0 10px;background:#f3f5f7!important;color:#475569!important;font-size:12px;font-weight:650;text-align:left;border-bottom:1px solid var(--cf-border)!important;white-space:nowrap}
.cfm-table tbody td{height:48px;padding:7px 10px;border-bottom:1px solid var(--cf-border)!important;background:#fff!important;color:#253247!important;vertical-align:middle;font-size:13px}
.cfm-table tbody tr:last-child td{border-bottom:0!important}
.cfm-table tbody tr:hover td{background:#fcfcfd!important}
.cfm-table tbody tr.is-dragging{opacity:.55}
.cfm-table tbody tr.is-dragover td{border-top:2px solid var(--cf-purple)!important}
.cfm-select{width:34px;text-align:center}.cfm-grip{width:30px;color:#b2bac7;cursor:grab;font-size:14px;letter-spacing:-3px}
.cfm-field-name{display:grid;gap:2px;min-width:180px}.cfm-field-link{display:inline!important;width:max-content;max-width:100%;border:0!important;background:transparent!important;color:#262f3f!important;padding:0!important;text-align:left;font-weight:650!important;box-shadow:none!important;border-radius:0!important;cursor:pointer}.cfm-field-link:hover{text-decoration:underline;color:#3d2f8f!important}.cfm-field-link:focus-visible{outline:2px solid #c7c2f7;outline-offset:2px}
.cfm-field-name code{font:11px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;color:#8792a5;background:transparent;padding:0}
.cfm-type{display:grid;gap:2px}.cfm-type b{font-weight:550;color:#334155}.cfm-type small{color:#8b95a7;font-size:11px}
.cfm-usage{display:inline!important;width:auto!important;min-width:0!important;border:0!important;background:transparent!important;color:#475569!important;padding:0!important;box-shadow:none!important;font-weight:550!important;border-radius:0!important;cursor:pointer}
.cfm-usage:hover{text-decoration:underline;color:#3d2f8f!important}.cfm-usage:focus-visible{outline:2px solid #c7c2f7;outline-offset:2px}
.cfm-origin{display:block;color:#475569;font-size:12px}.cfm-origin-detail{display:block;color:#98a2b3;font-size:10px;max-width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.cfm-state{display:inline-flex;align-items:center;min-height:22px;padding:1px 7px;border-radius:999px;font-size:11px;border:1px solid var(--cf-border-strong);background:#fff;color:#64748b}
.cfm-state.is-active{color:var(--cf-green);border-color:#bbf7d0;background:var(--cf-green-soft)}
.cfm-state.is-inactive{color:#64748b;background:#f8fafc}
.cfm-action{width:62px;text-align:right;position:relative}.cfm-action details{position:relative}.cfm-action summary{list-style:none;width:30px;height:28px;display:grid;place-items:center;margin-left:auto;border:1px solid var(--cf-border-strong);border-radius:6px;background:#fff;color:#64748b;cursor:pointer}.cfm-action summary::-webkit-details-marker{display:none}
.cfm-action details>div{position:absolute;z-index:30;right:0;top:33px;min-width:170px;background:#fff;border:1px solid var(--cf-border);border-radius:8px;box-shadow:0 10px 24px rgba(15,23,42,.10);padding:5px;display:grid;gap:2px}
.cfm-action details>div button{border:0!important;background:#fff!important;color:#334155!important;text-align:left!important;padding:7px 9px!important;border-radius:5px!important;box-shadow:none!important;font-size:12px!important}
.cfm-action details>div button:hover{background:#f7f7fa!important}
.cfm-empty{padding:30px;text-align:center;color:var(--cf-muted)}
.cfm-foot{display:flex;justify-content:space-between;gap:16px;color:var(--cf-muted);font-size:11px;padding:2px 2px 0}
.cfm-foot b{color:var(--cf-text)}

.cfm-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:2px 0 10px}.cfm-detail-grid>div,.cfm-detail-line{border:1px solid var(--cf-border);border-radius:7px;background:#fff;padding:9px;display:grid;gap:3px}.cfm-detail-grid span,.cfm-detail-line span{font-size:11px;color:var(--cf-muted)}.cfm-detail-grid b,.cfm-detail-line b{font-size:12px;color:var(--cf-text);font-weight:600}
.cfm-history{display:grid;gap:8px;max-height:420px;overflow:auto}.cfm-history>div{border:1px solid var(--cf-border);border-radius:7px;background:#fff;padding:9px;display:grid;gap:2px}.cfm-history b{font-size:12px}.cfm-history span,.cfm-history small{font-size:11px;color:var(--cf-muted)}

/* Custom Field columns enabled by the Management Center. */
.admin-lead-sheet-v11 .admin-custom-col-head{background:#f3f5f7!important;color:#4b5565!important;min-width:130px;max-width:190px}
.admin-lead-sheet-v11 td.admin-custom-col{background:#fff!important;color:#334155!important;min-width:130px;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.admin-drawer-custom-fields .admin-drawer-cf-group+ .admin-drawer-cf-group{margin-top:12px;padding-top:11px;border-top:1px solid #e6e9ef}
.admin-drawer-custom-fields .admin-drawer-cf-group h4{margin:0 0 7px;font-size:12px;color:#667085;font-weight:650;text-transform:none;letter-spacing:0}

/* Page-level hard guard against legacy global blue/teal button/card rules. */
html body .custom-fields-center-v13-2 .cfm-summary,
html body .custom-fields-center-v13-2 .cfm-toolbar,
html body .custom-fields-center-v13-2 .cfm-bulk,
html body .custom-fields-center-v13-2 .cfm-table-wrap,
html body .custom-fields-center-v13-2 .cfm-table td,
html body .custom-fields-center-v13-2 .cfm-table th{box-shadow:none!important}
html body #customFieldsCenterV132 button:not(.cfm-primary){background:#fff!important;color:#334155!important;border-color:var(--cf-border-strong)!important;box-shadow:none!important}
html body #customFieldsCenterV132 .cfm-field-link,
html body #customFieldsCenterV132 .cfm-usage{background:transparent!important;background-image:none!important;color:#334155!important;border:0!important;box-shadow:none!important;text-shadow:none!important}
html body #customFieldsCenterV132 .cfm-field-link:hover,
html body #customFieldsCenterV132 .cfm-usage:hover{background:transparent!important;color:#3d2f8f!important}
html body #customFieldsCenterV132 .cfm-secondary{background:#fff!important;color:#334155!important;border:1px solid var(--cf-border-strong)!important}
html body #customFieldsCenterV132 .cfm-secondary:hover{background:#f8fafc!important;color:#172033!important}

@media(max-width:1200px){.cfm-summary{grid-template-columns:repeat(4,1fr)}.cfm-summary span:nth-child(4n){border-right:0}.cfm-toolbar{grid-template-columns:minmax(240px,1fr) repeat(3,minmax(120px,.7fr));}.cfm-toolbar>*:nth-child(n+5){grid-row:2}}
@media(max-width:760px){.cfm-head{flex-direction:column}.cfm-head>div:last-child{width:100%}.cfm-primary{width:100%}.cfm-summary{grid-template-columns:repeat(2,1fr)}.cfm-toolbar{grid-template-columns:1fr 1fr}.cfm-search{grid-column:1/-1}.cfm-foot{flex-direction:column}.cfm-detail-grid{grid-template-columns:1fr}}
.cfm-name-warning{color:#a16207;font-size:10px;line-height:1.25;margin-top:2px}

/* V13.2.1 hard lock: no structural blue/teal surfaces in Custom Fields center. */
html body #customFieldsCenterV132 .cfm-table tbody td,
html body #customFieldsCenterV132 .cfm-table tbody tr,
html body #customFieldsCenterV132 .cfm-field-name,
html body #customFieldsCenterV132 .cfm-type,
html body #customFieldsCenterV132 .cfm-origin{background:#fff!important;background-image:none!important}
html body #customFieldsCenterV132 .cfm-field-link,
html body #customFieldsCenterV132 .cfm-usage{appearance:none!important;-webkit-appearance:none!important;min-height:0!important;height:auto!important}


/* V13.2.2 — action-menu neutral lock.
   Menu buttons use .secondary so the legacy Admin primary-button hard lock never fills them blue. */
html body #root .shell.crm-role-admin .main #view.view-content #customFieldsCenterV132 .cfm-action details>div button.cfm-menu-action.secondary{
  background:#fff!important;
  background-image:none!important;
  color:#334155!important;
  border:0!important;
  box-shadow:none!important;
  text-shadow:none!important;
  text-align:left!important;
}
html body #root .shell.crm-role-admin .main #view.view-content #customFieldsCenterV132 .cfm-action details>div button.cfm-menu-action.secondary:hover,
html body #root .shell.crm-role-admin .main #view.view-content #customFieldsCenterV132 .cfm-action details>div button.cfm-menu-action.secondary:focus-visible{
  background:#f6f7f9!important;
  color:#172033!important;
  border:0!important;
}
html body #root .shell.crm-role-admin .main #view.view-content #customFieldsCenterV132 .cfm-action details>div button.cfm-menu-danger.secondary{color:#b42318!important;}
html body #root .shell.crm-role-admin .main #view.view-content #customFieldsCenterV132 .cfm-action details>div button.cfm-menu-activate.secondary{color:#067647!important;}


/* V13.2.3 — root fix: action dropdown items are no longer <button> elements,
   so legacy Admin primary-button rules cannot paint them blue. */
html body #customFieldsCenterV132 .cfm-action details>div[role="menu"]{
  background:#fff!important;
  border:1px solid #e1e5ec!important;
  box-shadow:0 10px 24px rgba(15,23,42,.10)!important;
}
html body #customFieldsCenterV132 .cfm-action .cfm-menu-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 .cfm-menu-item:hover,
html body #customFieldsCenterV132 .cfm-action .cfm-menu-item:focus-visible{
  background:#f6f7f9!important;
  color:#172033!important;
  outline:none!important;
}
html body #customFieldsCenterV132 .cfm-action .cfm-menu-item.cfm-menu-danger{color:#b42318!important;}
html body #customFieldsCenterV132 .cfm-action .cfm-menu-item.cfm-menu-activate{color:#067647!important;}
