:where(.badge, .chip, .status-badge) {
  border-radius: 999px;
}

:where(.lf-chip) {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--lf-space-1);
  padding: 0 var(--lf-space-2);
  border: 1px solid var(--lf-color-border);
  border-radius: var(--lf-radius-pill);
  background: var(--lf-color-surface-muted);
  color: var(--lf-color-muted);
  font-size: var(--lf-font-size-xs);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

:where(.lf-chip--success) {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

:where(.lf-chip--warning) {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

:where(.lf-chip--danger) {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.1);
  color: #b42318;
}

:where(.lf-chip--info) {
  border-color: rgba(14, 165, 233, 0.22);
  background: rgba(14, 165, 233, 0.1);
  color: #075985;
}

:where(.lf-pill) {
  min-width: 24px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--lf-space-1);
  border-radius: var(--lf-radius-pill);
  padding: 0 var(--lf-space-2);
  background: var(--lf-color-primary-soft);
  color: var(--lf-color-primary);
  font-size: var(--lf-font-size-xs);
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

:where(.lf-pill--success) {
  background: rgba(34, 197, 94, 0.12);
  color: #059669;
}

:where(.lf-pill--warning) {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
}

:where(.lf-status-tabs) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--lf-space-2);
  padding: var(--lf-space-4) 14px 0;
}

:where(.lf-status-tab) {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: var(--lf-radius-md) var(--lf-radius-md) 0 0;
  background: transparent;
  color: var(--lf-color-muted);
  font: inherit;
  font-size: var(--lf-font-size-sm);
  font-weight: 700;
  cursor: pointer;
}

:where(.lf-status-tab.is-active) {
  border-color: var(--lf-color-primary);
  background: var(--lf-color-primary-soft);
  color: var(--lf-color-primary);
  font-weight: 800;
}

body.dashboard-client-flat-theme > .shell :is(
  .status-badge,
  .alert-badge,
  .dashboard-status-chip,
  .dashboard-plan-chip,
  .plan-status-pill,
  .client-status-pill,
  .users-pill,
  .integration-status-pill,
  .integration-saas-badge,
  .integration-service-status,
  .module-state-badge,
  .chip,
  .pipeline-ticket-chip
) {
  min-height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--lf-space-1) !important;
  padding: 0 var(--lf-space-2) !important;
  border: 1px solid var(--lf-color-border) !important;
  border-radius: var(--lf-radius-pill) !important;
  background: var(--lf-color-surface-muted) !important;
  color: var(--lf-color-muted) !important;
  box-shadow: none !important;
  font-size: var(--lf-font-size-xs) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .status-badge.success,
  .status-badge.client,
  .dashboard-status-chip.is-active,
  .plan-status-pill,
  .client-status-pill,
  .users-pill-status.is-active,
  .integration-status-pill.success,
  .integration-saas-badge.success,
  .integration-service-status.success,
  .module-state-badge--enabled,
  .chip.success,
  .module-chip-positive
) {
  border-color: rgba(34, 197, 94, 0.22) !important;
  background: rgba(34, 197, 94, 0.12) !important;
  color: #166534 !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .status-badge.warning,
  .alert-badge.warning,
  .integration-status-pill.warning,
  .integration-saas-badge.warning,
  .integration-service-status.warning,
  .dashboard-task-badge--warm
) {
  border-color: rgba(245, 158, 11, 0.24) !important;
  background: rgba(245, 158, 11, 0.12) !important;
  color: #92400e !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .status-badge.error,
  .status-badge.critical,
  .alert-badge.critical,
  .integration-status-pill.error,
  .integration-saas-badge.error,
  .integration-service-status.error,
  .users-pill-status.is-inactive,
  .module-state-badge--disabled
) {
  border-color: rgba(239, 68, 68, 0.22) !important;
  background: rgba(239, 68, 68, 0.1) !important;
  color: #b42318 !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .dashboard-plan-chip,
  .pipeline-ticket-chip,
  .status-badge.prospect,
  .module-state-badge--auto
) {
  border-color: rgba(37, 99, 235, 0.2) !important;
  background: var(--lf-color-primary-soft) !important;
  color: var(--lf-color-primary) !important;
}
