/* Management centre: emphasise the hit target without shifting the figures or their neighbours. */
@media screen {
  #jp-native-root .center-shell {
    --mc-feedback-ink: #2563d7;
    --mc-hover-wash: rgb(36 101 210 / 5%);
    --mc-press-wash: rgb(36 101 210 / 10%);
    --mc-ease: cubic-bezier(.2,.75,.25,1);
  }
  html[data-theme="dark"] #jp-native-root .center-shell {
    --mc-feedback-ink: #96c4ff;
    --mc-hover-wash: rgb(138 185 255 / 9%);
    --mc-press-wash: rgb(138 185 255 / 16%);
  }

  #jp-native-root .center-shell :is(main, .topbar, .modal-backdrop, .mobile-bottom-nav)
    :is(button:not(:disabled),a[href],input:not(:disabled),select:not(:disabled),textarea:not(:disabled),[role="tab"]):focus-visible {
    outline: 2px solid var(--mc-feedback-ink) !important;
    outline-offset: 3px !important;
  }
  #jp-native-root .center-shell :is(.sf-kpis,.cm-metric-group,.ps-kpis,.fs-cash-kpis,.ov-metric-tabs)
    button:not(:disabled):focus-visible {
    border-radius: 8px !important;
    outline-offset: -2px !important;
  }
  #jp-native-root .center-shell :is(.sf-segment,.ov-metric-tabs,.ab-mobile-tabs,.date-presets,.fs-segment,.cm-sort)
    button:not(:disabled),
  #jp-native-root .center-shell :is(.button,.icon-button,.center-date-control,.center-export-control,.shell-search-trigger,.account-button,
    .center-target-edit,.ac-reset,.ab-link,.fs-link,.text-button,.sf-filter-button):not(:disabled) {
    transition: background-color 120ms var(--mc-ease), border-color 120ms var(--mc-ease),
      color 120ms var(--mc-ease), box-shadow 140ms var(--mc-ease), filter 100ms ease-out !important;
  }
  #jp-native-root .center-shell :is(.sf-segment,.ov-metric-tabs,.ab-mobile-tabs,.date-presets,.fs-segment,.cm-sort)
    button:not(:disabled):active,
  #jp-native-root .center-shell :is(.button,.icon-button,.center-date-control,.center-export-control,.shell-search-trigger,.account-button,
    .center-target-edit,.ac-reset,.ab-link,.fs-link,.text-button,.sf-filter-button):not(:disabled):active {
    transform: none !important;
    filter: brightness(.94);
    transition-duration: 65ms !important;
  }
  #jp-native-root .center-shell :is(.sfm-pair, .ps-v7-group, .fs-cash-kpis) button:not(:disabled),
  #jp-native-root .center-shell button:is(.cm-stat,.ia-risk,.ab-risk,.ab-due,.ov-day,.risk-item,.ov-business-item,
    .cockpit-primary-metric,.ec-metric-profit,.cp-rate-metric,.ia-total,.fs-profit-value,.fs-margin,.fs-balance,.ps-v10-funds-item) {
    transition: background-color 140ms var(--mc-ease), color 120ms var(--mc-ease),
      border-color 140ms var(--mc-ease), box-shadow 140ms var(--mc-ease) !important;
  }
  #jp-native-root .center-shell :is(.sfm-pair .sfm-chevron,.cm-view-client .icon,.ab-link .icon,.fs-view .icon) {
    transition: transform 150ms var(--mc-ease), color 130ms ease-out !important;
  }
  @media (pointer: coarse) {
    #jp-native-root .center-shell :is(main,.topbar,.mobile-bottom-nav) :is(button:not(:disabled),a[href]) {
      touch-action: manipulation;
      -webkit-tap-highlight-color: rgb(65 122 191 / 14%);
    }
    #jp-native-root .center-shell .sfm-pair button.sfm-card { border-radius: 9px !important; }
  }
  @media (hover: hover) and (pointer: fine) {
    #jp-native-root .center-shell :is(.sfm-pair,.ps-v7-group,.fs-cash-kpis) button:not(:disabled):hover,
    #jp-native-root .center-shell button:is(.cm-stat,.ia-risk,.ab-risk,.ab-due,.ov-day,.risk-item,.ov-business-item,
      .cockpit-primary-metric,.ec-metric-profit,.cp-rate-metric,.ia-total,.fs-profit-value,.fs-margin,.fs-balance,.ps-v10-funds-item):not(:disabled):hover {
      transform: none !important;
    }
    #jp-native-root .center-shell :is(.cm-metric-pair,.ia-summary-v7) button:is(.cm-stat,.ia-risk):not(:disabled):hover {
      border-radius: 9px !important;
      box-shadow: none !important;
      background-color: var(--mc-hover-wash) !important;
    }
    /* Sales renders paired, borderless readouts flush with a shared panel. The old hover
       shadow drew a square immediately beside the text; keep the external panel as the boundary. */
    #jp-native-root .center-shell .sfm-pair button.sfm-card:not(:disabled):hover {
      background: color-mix(in srgb, var(--metric-accent,var(--mc-feedback-ink)) 6%, transparent) !important;
      border-radius: 9px !important;
      box-shadow: none !important;
    }
    #jp-native-root .center-shell .sfm-pair button.sfm-card:not(:disabled):hover .sfm-chevron,
    #jp-native-root .center-shell :is(.cm-view-client,.ab-link,.fs-account-row,.fs-full-tx-row):not(:disabled):hover :is(.icon,.fs-view .icon):last-child {
      transform: translateX(2px) !important;
    }
    #jp-native-root .center-shell :is(.shell-search-trigger,.center-date-control,.icon-button,.account-button):not(:disabled):hover {
      background-color: var(--mc-hover-wash) !important;
    }
  }
  #jp-native-root .center-shell .sfm-pair button.sfm-card:not(:disabled):active {
    border-radius: 9px !important;
    background: color-mix(in srgb, var(--metric-accent,var(--mc-feedback-ink)) 12%, transparent) !important;
    box-shadow: none !important;
    transform: none !important;
    transition-duration: 60ms !important;
  }
  #jp-native-root .center-shell :is(.ps-v7-group,.fs-cash-kpis) button:not(:disabled):active,
  #jp-native-root .center-shell button:is(.cm-stat,.ia-risk,.ab-risk,.ab-due,.ov-day,.risk-item,.ov-business-item,
    .cockpit-primary-metric,.ec-metric-profit,.cp-rate-metric,.ia-total,.fs-profit-value,.fs-margin,.fs-balance,.ps-v10-funds-item):not(:disabled):active {
    box-shadow: inset 0 0 0 100vmax var(--mc-press-wash) !important;
    transform: none !important;
    transition-duration: 60ms !important;
  }
  @media (prefers-reduced-motion: reduce) {
    #jp-native-root#jp-native-root .center-shell :is(main,.topbar,.modal-backdrop,.mobile-bottom-nav) :is(button,a,input,textarea,select,.icon,.sfm-chevron,[role="dialog"]) {
      animation-duration: 0s !important;
      transition-duration: 0s !important;
      scroll-behavior: auto !important;
    }
    #jp-native-root .center-shell .sfm-pair button.sfm-card:not(:disabled):hover .sfm-chevron,
    #jp-native-root .center-shell :is(.cm-view-client,.ab-link,.fs-account-row,.fs-full-tx-row):not(:disabled):hover :is(.icon,.fs-view .icon):last-child {
      transform: none !important;
    }
  }
  @media (forced-colors: active) {
    #jp-native-root .center-shell :is(button,a,input,textarea,select):focus-visible { outline-color: Highlight !important; }
  }
}
