/*
  TeamAct CRM — Company Admin NO-TEAL HARD LOCK V9
  Scope: Company Admin MAIN content only. Sidebar is intentionally excluded.
  Loaded last to beat legacy high-specificity !important teal rules.
*/

/* Neutral Company Admin main canvas and top search. */
html body #root .shell.crm-role-admin .main,
html body #root .shell.crm-role-admin .main .workspace,
html body #root .shell.crm-role-admin .main #view.view-content{
  background:#fff!important;
}
html body #root .shell.crm-role-admin .main .top-search{
  background:#fff!important;
  background-image:none!important;
  border-color:#dcdcdc!important;
  box-shadow:none!important;
}
html body #root .shell.crm-role-admin .main .top-search:focus-within{
  background:#fff!important;
  border-color:#8ea5ea!important;
  box-shadow:0 0 0 2px rgba(54,87,200,.08)!important;
}

/*
  Generic Company Admin primary actions: legacy teal override uses a very
  specific !important selector. This selector deliberately has higher
  specificity and is limited to .main, so sidebar active teal remains intact.
*/
html body #root .shell.crm-role-admin .main #view.view-content button:not(.secondary):not(.danger):not(.icon-button):not(.action-tile):not(.hamburger):not([data-nav]):not(.lead-action-button):not(.exact-link):not(.password-visibility-toggle):not(.ar-sort):not(.ar-user-link):not([data-ar-tab]):not(.crm-date-proxy):not(.adc-kpi):not(.adc-attention-row):not(.adc-text-link):not(.adc-user-link):not([data-dash-report-tab]):not([data-dash-go]):not([data-dash-user]):not([data-adc-sort]):not(#adcAddLead):not(#adcImportLead):not(#adcAddUser):not(#adcOpenFollowups):not(.r360-kpi):not(.r360-attention-row):not(.r360-breakdown-row):not(.r360-sort):not(.r360-user-link):not(.r360-text-link):not([data-r360-tab]):not([data-r360-go]):not([data-r360-user]):not([data-r360-sort]):not([data-r360-tab-jump]):not(.company-lead-status-button):not(.crm-unified-lead-status-chip):not(.admin-lead-status-button):not(.admin-lead-id-link):not(.admin-lead-name-link):not(.admin-lead-sort):not(.admin-lead-hub-card):not(.admin-leads-v12-back):not(.admin-mobile-copy):not(.danger-outline):not([data-lead-tab]):not([data-columns-reset]):not(#adminAddManualLead):not(#adminBulkImport):not(#adminShowAllLeads):not(#adminBulkImportSecond){
  background:#3657c8!important;
  background-image:none!important;
  color:#fff!important;
  border-color:#3657c8!important;
  box-shadow:none!important;
}
html body #root .shell.crm-role-admin .main #view.view-content button:not(.secondary):not(.danger):not(.icon-button):not(.action-tile):not(.hamburger):not([data-nav]):not(.lead-action-button):not(.exact-link):not(.password-visibility-toggle):not(.ar-sort):not(.ar-user-link):not([data-ar-tab]):not(.crm-date-proxy):not(.adc-kpi):not(.adc-attention-row):not(.adc-text-link):not(.adc-user-link):not([data-dash-report-tab]):not([data-dash-go]):not([data-dash-user]):not([data-adc-sort]):not(#adcAddLead):not(#adcImportLead):not(#adcAddUser):not(#adcOpenFollowups):not(.r360-kpi):not(.r360-attention-row):not(.r360-breakdown-row):not(.r360-sort):not(.r360-user-link):not(.r360-text-link):not([data-r360-tab]):not([data-r360-go]):not([data-r360-user]):not([data-r360-sort]):not([data-r360-tab-jump]):not(.company-lead-status-button):not(.crm-unified-lead-status-chip):not(.admin-lead-status-button):not(.admin-lead-id-link):not(.admin-lead-name-link):not(.admin-lead-sort):not(.admin-lead-hub-card):not(.admin-leads-v12-back):not(.admin-mobile-copy):not(.danger-outline):not([data-lead-tab]):not([data-columns-reset]):not(#adminAddManualLead):not(#adminBulkImport):not(#adminShowAllLeads):not(#adminBulkImportSecond):hover:not(:disabled){
  background:#2c47aa!important;
  color:#fff!important;
  border-color:#2c47aa!important;
}

/* Secondary/utility actions are white/neutral. */
html body #root .shell.crm-role-admin .main #view.view-content button.secondary:not(.danger):not(.icon-button),
html body #root .shell.crm-role-admin .main .topbar button.secondary{
  background:#fff!important;
  background-image:none!important;
  color:#405270!important;
  border-color:#ccd6e3!important;
  box-shadow:none!important;
}
html body #root .shell.crm-role-admin .main #view.view-content button.secondary:not(.danger):not(.icon-button):hover:not(:disabled),
html body #root .shell.crm-role-admin .main .topbar button.secondary:hover:not(:disabled){
  background:#f3f6ff!important;
  color:#29458f!important;
  border-color:#aebdea!important;
}

/* User Reports tabs: flat white, purple active underline — never filled teal. */
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting .ar-tabs > button[data-ar-tab]{
  background:#fff!important;
  background-image:none!important;
  color:#475569!important;
  border:0!important;
  border-bottom:2px solid transparent!important;
  border-radius:0!important;
  box-shadow:none!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting .ar-tabs > button[data-ar-tab]:hover{
  background:#fff!important;
  color:#4f38a2!important;
  border-bottom-color:#d8d1ef!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting .ar-tabs > button[data-ar-tab].active{
  background:#fff!important;
  color:#4f38a2!important;
  border-bottom-color:#4f38a2!important;
}

/* User Reports Apply is purple; sortable header/user links are transparent. */
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting button.ar-apply{
  background:#4f38a2!important;
  background-image:none!important;
  color:#fff!important;
  border-color:#4f38a2!important;
  box-shadow:none!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting button.ar-apply:hover:not(:disabled){
  background:#604cab!important;
  border-color:#604cab!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting button.ar-sort,
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting button.ar-user-link{
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  box-shadow:none!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting button.ar-sort{
  color:#707070!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting button.ar-sort:hover{
  color:#4f38a2!important;
  background:transparent!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting button.ar-sort span{
  color:#4f38a2!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting button.ar-user-link{
  color:#4f38a2!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting button.ar-user-link:hover{
  color:#604cab!important;
  background:transparent!important;
}

/* Report inputs and table stay white/neutral. */
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting :is(input,select,textarea){
  background:#fff!important;
  color:#333!important;
  border-color:#dcdcdc!important;
  box-shadow:none!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting :is(input,select,textarea):focus{
  border-color:#4f38a2!important;
  box-shadow:0 0 0 2px rgba(79,56,162,.08)!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting .ar-table-wrap th{
  background:#eee!important;
  color:#707070!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting .ar-table-wrap td{
  background:#fff!important;
  color:#333!important;
}

/* If text is selected, selection highlight is violet rather than teal. */
html body #root .shell.crm-role-admin .main *::selection{
  background:#ded7f5!important;
  color:#2e2e2e!important;
}

/* V9: semantic Lead Status colours are never remapped here.
   global-lead-status-unified-v3.css owns the canonical status palette. */

/* Dark mode stays neutral/blue instead of teal. */
html.theme-dark body #root .shell.crm-role-admin .main,
html.theme-dark body #root .shell.crm-role-admin .main .workspace,
html.theme-dark body #root .shell.crm-role-admin .main #view.view-content{
  background:#182231!important;
}
html.theme-dark body #root .shell.crm-role-admin .main #view.view-content .admin-reporting .ar-tabs > button[data-ar-tab]{
  background:#182231!important;
  color:#c9d3e1!important;
}
html.theme-dark body #root .shell.crm-role-admin .main #view.view-content .admin-reporting .ar-tabs > button[data-ar-tab].active{
  color:#b8a8f0!important;
  border-bottom-color:#9c86e8!important;
}

/* ==========================================================
   V7.2 FIX — Admin custom date fields must stay white.
   The visible TeamAct date field is a button.crm-date-proxy,
   so it must never inherit generic primary-action fills.
   ========================================================== */
html body #root .shell.crm-role-admin .main #view.view-content button.crm-date-proxy,
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting button.crm-date-proxy{
  width:100%!important;
  min-height:36px!important;
  height:36px!important;
  padding:6px 10px!important;
  background:#fff!important;
  background-image:none!important;
  color:#333!important;
  border:1px solid #dcdcdc!important;
  border-radius:6px!important;
  box-shadow:none!important;
  font-weight:400!important;
}
html body #root .shell.crm-role-admin .main #view.view-content button.crm-date-proxy:hover,
html body #root .shell.crm-role-admin .main #view.view-content button.crm-date-proxy:focus-visible,
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting button.crm-date-proxy:hover,
html body #root .shell.crm-role-admin .main #view.view-content .admin-reporting button.crm-date-proxy:focus-visible{
  background:#fff!important;
  background-image:none!important;
  color:#333!important;
  border-color:#4f38a2!important;
  box-shadow:0 0 0 2px rgba(79,56,162,.08)!important;
  outline:0!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .crm-date-proxy .crm-date-proxy-value{
  color:#333!important;
  font-weight:400!important;
}
html body #root .shell.crm-role-admin .main #view.view-content .crm-date-proxy .crm-date-proxy-icon{
  color:#707070!important;
}



/* V8.1: Dashboard command-center structural controls are NOT primary CTA buttons.
   Their visual styling is owned by the dashboard stylesheet loaded after this file. */


/* ==========================================================
   V10.1 FIX — 360° Reporting structural controls are NOT CTAs.
   These exclusions intentionally prevent the global primary-action
   hard lock from filling report cards, rows, funnels and sort links.
   ========================================================== */


/* V10.2 — Lead status chips and Leads Section workspace actions own their visual styling.
   They are intentionally excluded from generic filled primary-action rules above. */
