.bo-clients-grid {
  display: grid;
  gap: 18px;
}

.bo-client-stats {
  gap: 14px;
}

.bo-client-stat-card {
  min-height: 0;
  padding: 18px;
}

.bo-client-pairs {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.bo-client-pair {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.bo-client-pair + .bo-client-pair {
  padding-top: 10px;
  border-top: 1px solid var(--bo-line);
}

.bo-client-pair__value {
  font-family: var(--bo-font-display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.bo-client-pair__count {
  color: var(--bo-muted);
  font-size: 13px;
  font-weight: 700;
}

.bo-client-pair__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--bo-line);
  background: var(--bo-panel-soft);
  color: var(--bo-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bo-client-filters {
  display: grid;
  gap: 14px;
}

.bo-client-filters__row {
  display: grid;
  gap: 14px;
}

.bo-client-filters__row--search {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.bo-client-filters__row--options {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.bo-client-filters__reset {
  min-width: 148px;
}

.bo-client-search-field {
  min-width: 0;
}

.bo-client-search {
  position: relative;
}

.bo-client-search__input {
  min-height: 58px;
  padding: 0 148px 0 16px;
  border-radius: 20px;
}

.bo-client-search__scopes {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 8px;
}

.bo-client-search__scope {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--bo-line);
  border-radius: 12px;
  background: var(--bo-panel);
  color: var(--bo-muted);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.bo-client-search__scope:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 124, 250, 0.22);
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
}

.bo-client-search__scope.is-active {
  border-color: rgba(91, 124, 250, 0.24);
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
}

.bo-client-search__scope svg {
  width: 16px;
  height: 16px;
}

.bo-client-table-card {
  position: relative;
  gap: 16px;
}

.bo-client-table-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bo-client-table-bar__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (min-width: 1181px) {
  .bo-client-table-bar {
    position: sticky;
    top: var(--bo-desktop-sticky-offset);
    z-index: 6;
    padding-bottom: 14px;
    background: linear-gradient(180deg, var(--bo-panel), var(--bo-panel-soft));
    border-bottom: 1px solid var(--bo-line);
  }

  .bo-client-table-slot .bo-table-wrap {
    max-height: min(62vh, 780px);
  }

  .bo-client-table-card.is-fullscreen .bo-client-table-bar {
    top: 0;
  }

  .bo-client-table-card.is-fullscreen .bo-client-table-slot .bo-table-wrap {
    max-height: none;
  }
}

.bo-client-results {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--bo-line);
  background: var(--bo-panel);
  color: var(--bo-ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.bo-client-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.bo-client-toolbar__sort-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px 0 14px;
  border-radius: 14px;
  border: 1px solid var(--bo-line);
  background: var(--bo-panel);
}

.bo-client-toolbar__sort-label {
  color: var(--bo-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bo-client-toolbar__sort {
  min-width: 150px;
  min-height: 38px;
  padding: 0 24px 0 0;
  border: 0;
  background: transparent;
  color: var(--bo-ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bo-client-toolbar__sort:focus {
  outline: none;
}

.bo-client-toolbar__bulk {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bo-client-toolbar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--bo-line);
  background: var(--bo-panel);
  color: var(--bo-muted);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.bo-client-toolbar__icon:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 124, 250, 0.22);
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
}

.bo-client-toolbar__icon.is-active {
  border-color: rgba(91, 124, 250, 0.24);
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
}

.bo-client-toolbar__icon svg {
  width: 18px;
  height: 18px;
}

.bo-client-toolbar__action {
  min-height: 40px;
  padding: 0 14px;
  gap: 8px;
}

.bo-client-toolbar__action svg {
  width: 16px;
  height: 16px;
}

.bo-client-toolbar__icon:disabled,
.bo-client-toolbar__action:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  border-color: var(--bo-line);
  background: var(--bo-panel);
  color: var(--bo-muted);
  box-shadow: none;
}

.bo-client-toolbar__icon:disabled:hover,
.bo-client-toolbar__action:disabled:hover {
  transform: none;
  border-color: var(--bo-line);
  background: var(--bo-panel);
  color: var(--bo-muted);
}

.bo-client-table-slot {
  min-width: 0;
}

.bo-table--clients {
  min-width: 1100px;
}

.bo-table__actions--compact {
  align-items: center;
  flex-wrap: nowrap;
}

.bo-table__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--bo-line);
  background: var(--bo-panel);
  color: var(--bo-ink);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.bo-table__icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 124, 250, 0.24);
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
}

.bo-table__icon-btn svg {
  width: 16px;
  height: 16px;
}

.bo-table__icon-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  border-color: var(--bo-line);
  background: var(--bo-panel);
  color: var(--bo-muted);
}

.bo-table__icon-btn:disabled:hover {
  transform: none;
  border-color: var(--bo-line);
  background: var(--bo-panel);
  color: var(--bo-muted);
}

.bo-table__check-col {
  width: 54px;
}

.bo-table__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.bo-table__check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--bo-accent);
}

.bo-client-contact-cell {
  gap: 4px;
}

.bo-client-highlight {
  padding: 0 4px;
  border-radius: 8px;
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
}

.bo-client-table-card.is-fullscreen {
  position: fixed;
  inset: 16px;
  z-index: 45;
  max-width: none;
  margin: 0;
  padding: 18px;
  background: linear-gradient(180deg, var(--bo-panel), var(--bo-panel-soft));
  box-shadow: var(--bo-shell-shadow);
  display: grid;
  grid-template-rows: auto 1fr;
}

.bo-client-table-card.is-fullscreen .bo-client-table-slot {
  min-height: 0;
  display: grid;
}

.bo-client-table-card.is-fullscreen .bo-table-wrap {
  height: 100%;
  min-height: 0;
}

body.bo-client-fullscreen {
  overflow: hidden;
}

@media (max-width: 1180px) {
  .bo-client-filters__row--search {
    grid-template-columns: 1fr;
  }

  .bo-client-filters__reset {
    width: 100%;
  }

  .bo-client-table-bar {
    flex-direction: column;
  }

  .bo-client-table-bar__controls,
  .bo-client-toolbar {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 960px) {
  .bo-client-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .bo-client-search__input {
    padding-right: 138px;
  }

  .bo-client-toolbar__bulk {
    width: 100%;
  }

  .bo-client-toolbar__sort-field {
    width: 100%;
    justify-content: space-between;
  }

  .bo-client-toolbar__sort {
    min-width: 0;
    flex: 1 1 auto;
  }

  .bo-client-toolbar__action {
    flex: 1 1 auto;
    justify-content: center;
  }

  .bo-client-table-card.is-fullscreen {
    inset: 8px;
    padding: 16px;
  }
}

@media (max-width: 560px) {
  .bo-client-stats {
    grid-template-columns: 1fr;
  }

  .bo-client-filters__row--options {
    grid-template-columns: 1fr;
  }
}
