.global-search-bar { position: relative; }
.global-search-panel[hidden], .global-search-results[hidden], .global-search-footer[hidden], .global-search-status[hidden] { display: none; }
.global-search-panel {
  position: absolute;
  z-index: 2300;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(460px, calc(100vw - 24px));
  max-height: 520px;
  box-sizing: border-box;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d7e0e8;
  border-radius: 10px;
  box-shadow: 0 12px 35px rgba(20, 35, 47, .22);
  color: #2c3945;
  text-align: left;
  font-size: 13px;
  line-height: 1.4;
}
.global-search-status { flex: 0 0 auto; margin: 0; padding: 12px 14px; color: #697989; font-size: 12px; }
.global-search-results { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.global-search-group { padding: 0 6px 6px; }
.global-search-group__heading { display: flex; align-items: center; justify-content: space-between; padding: 9px 8px 5px; color: #687888; font-size: 11px; font-weight: 700; }
.global-search-group__count { color: #8b97a3; font-size: 10px; font-weight: 400; }
#header a.global-search-result {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 6px;
  color: #2c3945;
  text-decoration: none;
  overflow-wrap: anywhere;
}
#header a.global-search-result:hover, #header a.global-search-result[aria-selected="true"] { background: #edf3f8; color: #183f60; }
.global-search-result__title { font-size: 13px; font-weight: 600; }
.global-search-result__subtitle { color: #70808e; font-size: 11px; }
.global-search-footer { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 12px; padding: 11px 14px; border-top: 1px solid #e5ebf0; background: #f7f9fb; }
#header a.global-search-more { color: #2377a4; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.global-search-key-hint { color: #84919c; font-size: 10px; }
#header a.global-search-result:focus-visible, #header a.global-search-more:focus-visible { outline: 2px solid #819bb5; outline-offset: -2px; }
.crm-search-page { max-width: 1200px; }
.crm-search-page__form { display: flex; gap: 8px; margin: 16px 0 24px; max-width: 620px; }
.crm-search-page__form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #cbd5df; border-radius: 7px; font-size: 14px; }
.crm-search-page__form button { padding: 9px 18px; border: 0; border-radius: 7px; background: #2185bd; color: #fff; cursor: pointer; font-size: 14px; }
.crm-search-page__query, .crm-search-page__empty { color: var(--body-quiet-color, #687888); }
.crm-search-page__all { display: inline-block; margin-bottom: 16px; }
.crm-search-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.crm-search-group { min-width: 0; overflow: hidden; border: 1px solid var(--hairline-color, #dce4eb); border-radius: 9px; background: var(--body-bg, #fff); }
.crm-search-group__heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--hairline-color, #e5ebf0); }
.crm-search-group__heading h2 { margin: 0; padding: 0; background: transparent; color: var(--body-fg, #2c3945); font-size: 15px; }
.crm-search-group__heading span { flex: 0 0 auto; color: var(--body-quiet-color, #687888); font-size: 11px; }
.crm-search-group__items { margin: 0; padding: 4px 8px; list-style: none; }
.crm-search-group__items li { margin: 0; padding: 0; list-style: none; }
.crm-search-group__item { display: grid; gap: 4px; padding: 10px 8px; border-bottom: 1px solid var(--hairline-color, #edf0f3); text-decoration: none; overflow-wrap: anywhere; }
.crm-search-group__items li:last-child a { border-bottom: 0; }
.crm-search-group__item strong { font-size: 13px; }
.crm-search-group__item span { color: var(--body-quiet-color, #70808e); font-size: 12px; }
.crm-search-group__pagination { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; border-top: 1px solid var(--hairline-color, #e5ebf0); font-size: 12px; }
@media (max-width: 760px) {
  .global-search-panel { position: fixed; top: var(--global-search-panel-top, 72px); left: 12px; right: 12px; width: auto; }
  .global-search-key-hint { display: none; }
  .crm-search-groups { grid-template-columns: minmax(0, 1fr); }
}
